Skip to content

Instantly share code, notes, and snippets.

View abdollar's full-sized avatar

Abdul Chaudhry abdollar

View GitHub Profile
@abdollar
abdollar / app.js
Created February 8, 2014 01:40 — forked from auser/app.js
angular.module('myApp',
['ngRoute', 'myApp.services', 'myApp.directives']
)
.config(function(AWSServiceProvider) {
AWSServiceProvider.setArn('arn:aws:iam::<ACCOUNT_ID>:role/google-web-role');
})
.config(function(StripeServiceProvider) {
StripeServiceProvider.setPublishableKey('pk_test_YOURKEY');
})
.config(function($routeProvider) {
# Explanation at http://stackoverflow.com/questions/5212213/ruby-equivalent-of-php-openssl-seal/9428217#9428217
# Implementation
class EnvelopeEncryption
require "openssl"
# This method takes in plaintext and produces ciphertext and an
@abdollar
abdollar / keybase.md
Created February 26, 2015 06:28
keybase.md

Keybase proof

I hereby claim:

  • I am abdollar on github.
  • I am abdollar (https://keybase.io/abdollar) on keybase.
  • I have a public key whose fingerprint is 50B8 E7EE 0CBB 0FC1 7D52 9C5C B439 0DAB 9976 3B6E

To claim this, I am signing this object:

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:

/*
Delta Compression by Glenn Fiedler.
This source code is placed in the public domain.
http://gafferongames.com/2015/03/14/the-networked-physics-data-compression-challenge/
*/
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
@abdollar
abdollar / cards.swift
Last active September 1, 2015 16:14 — forked from erica/cards.swift
Cards
/*
Erica Sadun, http://ericasadun.com
GameplayKit Available 10.11, iOS 9
*/
import Foundation
import GameplayKit // only available on OS X 10.11, iOS 9
@abdollar
abdollar / gist:fccae96bb22c12568d9d
Last active September 2, 2015 20:36 — forked from chriswhitcombe/gist:2e0450294f370f493aec
Secure server in go (TLS Mutual Auth)
package main
import (
"crypto/tls"
"crypto/x509"
"io"
"io/ioutil"
"log"
"net/http"
)
@abdollar
abdollar / gist:0b05cec869cab4b561fc
Last active September 2, 2015 20:36 — forked from chriswhitcombe/gist:00d94c106f06d230cb2d
Secure client in go (TLS Mutual Auth)
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"log"
"net/http"
)
@abdollar
abdollar / rvm
Created March 8, 2011 04:12
Quick rvm helper commands
rvm install 1.9.2 -C --with-readline-dir=/opt/local,--build=x86_64-apple-darwin10
rvm use --create 1.9.2@rails3
rvm use --create 1.9.2@rails2
rvm use system
rvm use 1.9.2@rails3
@abdollar
abdollar / Disable the oom killer
Created March 8, 2011 04:13
Disable the oom killer on linux
disable oom-killer
Run as root or add to script - for passenger
for pid in $(pidof PassengerNginxHelperServer) ; do echo "disabling oom on pid $pid"; echo -17 | tee /proc/$pid/oom_adj > /dev/null; done