Skip to content

Instantly share code, notes, and snippets.

# oh my posh plugin => my theme
& ([ScriptBlock]::Create((oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/my_own_theme.omp.json" --print) -join "`n"))
Import-Module -Name Terminal-Icons
Import-Module -Name PSReadLine
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -Function DeleteChar
@AnnoyingTechnology
AnnoyingTechnology / Apple's SuperDrive tweak for use with Linux.md
Last active December 20, 2025 22:29
Make Apple's USB SuperDrive work on Linux

I was ready to throw it away, I opened it up and didn't find anything wrong with it. After a quick Google Search, turns out Apple fucked up their users (again) and locked this drive to only one laptop : the MacBook Air.

Bellow is the tweak (found online) to make it usable on Linux

# Debian/linux only - Linux SCSI generic driver
sudo apt install sg3-utils -y
---------------------------------------------------------------------
-- Script that creates the sample database TSQL2012
--
-- Supported versions of SQL Server: 2005, 2008, 2008 R2, 2012, SQL Azure
--
-- Based originally on the Northwind sample database
-- with changes in both schema and data
--
-- Last updated: 20120328
--
@benjamincharity
benjamincharity / autonomous.txt
Last active December 20, 2025 22:27
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
@rigwild
rigwild / record.vb
Created March 7, 2022 11:17
Export Powerpoint presentation as a 60 fps video
' Save presentation as pptm then create a macro in "View > Macros", run it
Sub MkVideo()
If ActivePresentation.CreateVideoStatus <> ppMediaTaskStatusInProgress Then
ActivePresentation.CreateVideo FileName:=Environ("USERPROFILE") & "\Desktop\video.wmv", _
UseTimingsAndNarrations:=True, _
VertResolution:=1080, _
FramesPerSecond:=60, _
Quality:=100
Else: MsgBox "There is another conversion to video in progress"
End If
@davidbau
davidbau / runningstats.py
Last active December 20, 2025 22:24
Running stats objects for pytorch: mean, variance, covariance, second-moment, quantiles, topk, and combinations.
'''
To use a runningstats object,
1. Create the the desired stat object, e.g., `m = Mean()`
2. Feed it batches via the add method, e.g., `m.add(batch)`
3. Repeat step 2 any number of times.
4. Read out the statistic of interest, e.g., `m.mean()`
Built-in runningstats objects include:
@Geczy
Geczy / 3 runner.sh
Last active December 20, 2025 22:22
free american airlines wifi
#!/bin/bash
# If not running via sudo, exit
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit
fi
# quit if jq is not installed
if ! command -v jq &>/dev/null; then
@hackermondev
hackermondev / research.md
Last active December 20, 2025 22:22
Unique 0-click deanonymization attack targeting Signal, Discord and hundreds of platform

hi, i'm daniel. i'm a 15-year-old high school junior. in my free time, i hack billion dollar companies and build cool stuff.

3 months ago, I discovered a unique 0-click deanonymization attack that allows an attacker to grab the location of any target within a 250 mile radius. With a vulnerable app installed on a target's phone (or as a background application on their laptop), an attacker can send a malicious payload and deanonymize you within seconds--and you wouldn't even know.

I'm publishing this writeup and research as a warning, especially for journalists, activists, and hackers, about this type of undetectable attack. Hundreds of applications are vulnerable, including some of the most popular apps in the world: Signal, Discord, Twitter/X, and others. Here's how it works:

Cloudflare

By the numbers, Cloudflare is easily the most popular CDN on the market. It beats out competitors such as Sucuri, Amazon CloudFront, Akamai, and Fastly. In 2019, a major Cloudflare outage k

@jarun
jarun / netplan.md
Last active December 20, 2025 22:19
Ubuntu Server 20.04 on Raspberry Pi 4: WiFi configuration from terminal with Netplan

List the network devices.

$ ls /sys/class/net
eth0  lo  wlan0

Edit the config file.

@jgrodziski
jgrodziski / docker-aliases.sh
Last active December 20, 2025 22:08
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #