Skip to content

Instantly share code, notes, and snippets.

@jerodsanto
jerodsanto / wire-for-podcasters.md
Created December 18, 2017 15:34
Wire for Podcasters

Wire for Podcasters

Why

Most podcasters (ourselves included) begrudgingly use Skype to record our shows for two reasons:

  1. Most reliable call quality/lacency
  2. Network effect (guests usually have an account already)

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@atcuno
atcuno / gist:3425484ac5cce5298932
Last active March 25, 2024 13:55
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

------------------------------------------------------------------------------------------
-- A formalization of the Cheryl's birtday problem; using Haskell/SBV
--
-- See: http://www.nytimes.com/2015/04/15/science/a-math-problem-from-singapore-goes-viral-when-is-cheryls-birthday.html
--
-- By Levent Erkok, This file is in the public domain. Use it as you wish!
--
-- NB. Thanks to Amit Goel for suggesting the formalization strategy used in here.
------------------------------------------------------------------------------------------
@ahoy-jon
ahoy-jon / hello.py
Created April 15, 2015 14:09
I wanted to use python as I use my Clojure
import sys
if not hasattr(sys, 'real_prefix'):
#we need a virtualenv activated env.
raise NameError('Not in virtualenv')
from subprocess import call, check_output
import os
@ahoy-jon
ahoy-jon / yo.md
Last active August 29, 2015 14:17
Avro better than X

For info, I gave a talk about it : http://www.slideshare.net/jwinandy/data-encoding-and-metadata-for-streams/17

a few points :

  • a reference to a schema is 64 bits (with hashing) or 32 bits if you use a coordination store (like Kafka + Camus does).

    • It's not a real waste of space, because you can use this reference for multiple payloads.
  • field renaming is well supported. In Avro you read your data with not one, but 2 schemas :

    • the one that was used to encode the data with (easy, it's around the data as metadata),
    • and the one you want to use to read your data.
@ryancdotorg
ryancdotorg / rsabd.py
Last active March 13, 2023 15:57
backdoored rsa key generation
#!/usr/bin/env python
import sys
import gmpy
import curve25519
from struct import pack
from hashlib import sha256
from binascii import hexlify, unhexlify
/// Phantom type for step 1.
pub enum Step1 {}
/// Phantom type for step 2.
pub enum Step2 {}
/// Contains data we set step by step.
pub struct Data<'a> {
/// 'a' is set in the first step.
a: Option<int>,

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption