Skip to content

Instantly share code, notes, and snippets.

View wbashir's full-sized avatar

Warsame Bashir wbashir

View GitHub Profile
/*Main.java*/
public class Main {
public static void main(String[] args) {
Animal dog = new Dog();
dog = new Name(dog, "Fido");
dog = new Color(dog, "brown");
@wbashir
wbashir / gist:a6a749d8abc29f3bec8e
Created February 20, 2015 04:09
Fiber Parent Callback
uploadS3: function (file, callback, callbackArgs) {
var s3 = new AWS.S3();
var options = {
partSize: 10 * 1024 * 1024,
queueSize: 1
};
s3.upload(file, options, function (error, data) {
if (callback) {
Meteor.wrapAsync(Meteor.call(callback, callbackArgs, {error: error, data: data})); //Barfs
@wbashir
wbashir / do_complete.py
Created April 18, 2015 00:01
Do Complete func
https://github.com/mitsuhiko/click/blob/master/click/_bashcomplete.py#L42
def do_complete(cli, prog_name):
cwords = split_arg_string(os.environ['COMP_WORDS'])
cword = int(os.environ['COMP_CWORD'])
args = cwords[1:cword]
try:
incomplete = cwords[cword]
except IndexError:
incomplete = ''
@wbashir
wbashir / physics.swift
Created July 22, 2015 15:47
Learn spritekit
http://www.spritekitlessons.com/day-5-learn-sprite-kit-and-swift/