Skip to content

Instantly share code, notes, and snippets.

View jeffrade's full-sized avatar

Jeff Rade jeffrade

View GitHub Profile
@masak
masak / explanation.md
Last active April 11, 2024 02:50
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@sipa
sipa / btc-beyondip.txt
Created September 23, 2011 16:19
Beyond IP transactions: towards a Bitcoin payment protocol
Beyond IP Transactions: towards a payment protocol
==================================================
IP transactions were originally introduced as a first "out-of-band" protocol
for negotiating a transaction output's public key. Being inconvenient and
insecure, they became obsolete, and recent versions of bitcoin don't support
them anymore.
The result is that static bitcoin addresses have become the most common way of
defining requested payments. This may be fine for anonymous donations, but is not
@sipa
sipa / blocksize.mediawiki
Last active September 22, 2023 08:22
Block size according to technological growth.

Published as BIP 103

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

public class TwoMains {
public static void main(String[] args) {
System.out.println("main");
mаin(args);
}
public static void mаin(String[] args) {
System.out.println("other mаin");
}
}
@elaineo
elaineo / podcast.py
Last active March 16, 2019 21:19
Turn podcasts into Twitter threads
from TwitterAPI import TwitterAPI
import json
import logging
import time
from collections import OrderedDict
from random import random
"""
Assume 3 participants. You will need to create a Twitter account for each participant, and get API keys for each one.
"""
@JoshCheek
JoshCheek / program.c
Last active April 6, 2018 17:28
Memory allocation, NULL, dereferencing.
// After you think you understand this program, try writing it yourself until
// you can get it to work, the first time, without error ^_^
//
// ALSO: remember:
// $ gcc program.c # compile
// $ ./a.out # run
// We'll get `printf` from standard input/output's header file
#include <stdio.h>