Skip to content

Instantly share code, notes, and snippets.

@nikhan
nikhan / twitter.sh
Created January 1, 2016 04:45
twitter ffmpeg
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4
{
"Africa/Abidjan": "+00:00",
"Africa/Accra": "+00:00",
"Africa/Addis_Ababa": "+03:00",
"Africa/Algiers": "+01:00",
"Africa/Asmara": "+03:00",
"Africa/Asmera": "+03:00",
"Africa/Bamako": "+00:00",
"Africa/Bangui": "+01:00",
"Africa/Banjul": "+00:00",

I'm writing in response to events that have recently come to light involving a sexual assault at a tech conference. Background information can be found [here][1], [here][2], and [here][3] as well as on twitter and google.


I've been watching this from the sidelines, and I've been wrestling with several questions that I can't seem to shake and that I really don't have answers to.

I wear many hats, both in the tech community and others. I'm a coder, a speaker, a user group organizer, a conference organizer, and even a boss. Each of those roles colors how I see this, but there's one role that is overpowering in my reaction.

See, I'm a Dad. A dad of two beautiful and innocent girls who are 3 and 2. They have their whole lives in front of them and so the questions I'm struggling with are:

def generate_RSA(bits=2048):
'''
Generate an RSA keypair with an exponent of 65537 in PEM format
param: bits The key length in bits
Return private key and public key
'''
from Crypto.PublicKey import RSA
new_key = RSA.generate(bits, e=65537)
public_key = new_key.publickey().exportKey("PEM")
private_key = new_key.exportKey("PEM")
@oddskool
oddskool / parse_aws_s3_billing.py
Created September 10, 2013 07:00
Simplistic script to parse the detailed AWS billing CSV file. Script displays cost of S3 operations broken down per region, bucket and usage type (either storage or network). It also sums up the amount of storage used per bucket. Output is filtered wrt to costs < 1$. See http://docs.aws.amazon.com/awsaccountbilling/latest/about/programaccess.html
# -*- coding:utf-8 -*-
'''
Simplistic script to parse the detailed AWS billing CSV file.
Script displays cost of S3 operations broken down per region, bucket and usage
type (either storage or network). It also sums up the amount of storage used per bucket.
Output is filtered wrt to costs < 1$.
See http://docs.aws.amazon.com/awsaccountbilling/latest/about/programaccess.html for
how to set up programmatic access to your billing.
@HHRy
HHRy / gist:6389485
Created August 30, 2013 12:48
Letter to MP

Dear Mr Lazarowicz,

I’ve recently came across the news that the UK Border Agency are trailing some new signage in centers in Glasgow and London - these signs targeting the most vulnerable asylum seekers telling to go home are, to me, disgusting.

On every chair back, and every wall, and hanging from the ceiling are signs which read “Ask about going home”, “Is life here hard? Going home is simple.” and “This plane can take you home, we can book the tickets”.

These people are here because they’re facing persecution at home and are seeking shelter and freedom here. These signs are a repulsive throwback to some of the more dark chapters of recent European history and have no place in a compassionate, modern democracy.

I urge you to please do what you can to end this demeaning practice.

@extraordinaire
extraordinaire / reconnecting_pdo.php
Last active June 27, 2023 11:12
Reconnectable PDO
<?php
class ReconnectingPDO
{
protected $dsn, $username, $password, $pdo, $driver_options;
public function __construct($dsn, $username = "", $password = "", $driver_options = array())
{
$this->dsn = $dsn;
$this->username = $username;
$this->password = $password;
@klange
klange / _.md
Last active December 2, 2023 20:36
It's a résumé, as a readable and compilable C source file. Since Hacker News got here, this has been updated to be most of my actual résumé. This isn't a serious document, just a concept to annoy people who talk about recruiting and the formats they accept résumés in. It's also relatively representative of my coding style.

Since this is on Hacker News and reddit...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is a good bit crazier.
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • Since people kept complaining, I've fixed the assignments of string literals to non-const char *s.
  • My use of type * name, however, is entirely intentional.
  • If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at le
@AndyA
AndyA / bbc-svn-million
Created November 1, 2012 15:43
BBC FM svn commit 1,000,000.
------------------------------------------------------------------------
r1000000 | **** REDACTED ****
MMMMMMMMMMMMMMMMMMMMMMMM ~MMMMMMMMMMMMMMMMMMMMMMMM NMMMMMMMMMMMMMMMMMMMMMMM7
MMMMMMIIIIIINMMMMMMMMMMM ~MMMMMMIIIIIIMMMMMMMMMMMM NMMMMMMMMMM~ ?MMMMMMMM7
MMMMMM ,MMMMMMMM ~MMMMMM ZMMMMMMMM NMMMMMM. MMMMM7
MMMMMM MMMM ZMMMMMMM ~MMMMMM MMMM MMMMMMMM NMMMMM MMMMMMM? MMMMM7
MMMMMM MMMMZ :MMMMMMM ~MMMMMM MMMM NMMMMMMM NMMMM MMMMMMMMMMMMMMMM7
MMMMMM MMM= MMMMMMMM ~MMMMMM MMM. MMMMMMMM NMMM MMMMMMMMMMMMMMMMM7
MMMMMM +MMMMMMMM ~MMMMMM ZMMMMMMMM NMMM MMMMMMMMMMMMMMMMM7
@paulirish
paulirish / gist:3098860
Created July 12, 2012 15:26
Open Conference Expectations

Open Conference Expectations

This document lays out some baseline expectations between conference speakers and conference presenters. The general goal is to maximize the value the conference provides to its attendees and community and to let speakers know what they might reasonably expect from a conference.

We believe that all speakers should reasonably expect these things, not just speakers who are known to draw large crowds, because no one is a rockstar but more people should have the chance to be one. We believe that conferences are better -- and, dare we say, more diverse -- when the people speaking are not just the people who can afford to get themselves there, either because their company paid or they foot the bill themselves. Basically, this isn't a rock show rider, it's some ideas that should help get the voices of lesser known folks heard.

These expectations should serve as a starting point for discussion between speaker and organizer. They are not a list of demands; they are a list of rea