Skip to content

Instantly share code, notes, and snippets.

View icanhasjonas's full-sized avatar
🎩
crunching

Jonas Frost icanhasjonas

🎩
crunching
  • Bombsquad Inc, FRST Corp
  • Los Angeles, Chicago, Copenhagen, Stockholm, Bangkok
View GitHub Profile
using System.Numerics;
namespace Encompass.Collections
{
public static class BitSet1024Builder
{
public static BitSet1024 Zeroes()
{
return new BitSet1024(Vector256Builder.Zeroes(), Vector256Builder.Zeroes(), Vector256Builder.Zeroes(), Vector256Builder.Zeroes());
}
@dvf
dvf / change-codec.md
Last active April 19, 2025 04:58
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@pamolloy
pamolloy / README.md
Last active October 16, 2024 20:40
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
@fnky
fnky / ANSI.md
Last active April 21, 2025 07:12
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
You don't have to be beautiful to turn me on
I just need your body baby from dusk till dawn
You don't need experience to turn me out
You just leave it all up to me
I'm gonna show you what it's all about
You don't have to be rich to be my girl
You don't have to be cool to rule my world
Ain't no particular sign I'm more compatible with
I just want your extra time and your
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active August 17, 2024 06:33
An Open Letter to Developers Everywhere (About Cryptography)

Let's solve the following physics problem using Symbolism, a computer algebra library for C#.

One strategy in a snowball fight is to throw a first snowball at a high angle over level ground. While your opponent is watching the first one, you throw a second one at a low angle and timed to arrive at your opponent before or at the same time as the first one.

Assume both snowballs are thrown with a speed of 25.0 m/s.

The first one is thrown at an angle of 70.0° with respect to the horizontal.

@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active February 20, 2025 09:37
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 20, 2025 21:14
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@johan
johan / README.md
Last active April 18, 2025 15:35
A micro-library (4k minified) for DRY:ing up the boring boilerplate of user scripts.

The fun part of user scripting is deciding what happens. The boring part is scavenging the DOM for bits of templated data, or elements you want to mod.

Have on.js do it for you!