Skip to content

Instantly share code, notes, and snippets.

View hamin's full-sized avatar

Haris Amin hamin

  • Currently ionq.co. Previously symbiont.io, getpager.com, itsglimpse.com, dailburn.com
  • New York,NY
View GitHub Profile
@hamin
hamin / the_suburbs.rb
Last active October 26, 2019 08:50
Arcade Fire's 'The Suburbs' in Sonic PI ;) Download http://sonic-pi.net and copy paste this Grammy Winning gem ;)
in_thread do
loop do
sample :drum_bass_hard, amp: 2
sleep 2
end
end
in_thread do
loop do
sleep 1

Keybase proof

I hereby claim:

  • I am hamin on github.
  • I am harisamin (https://keybase.io/harisamin) on keybase.
  • I have a public key ASACyIRY0fUPf2dfVGQ2rfvMEfEfcdGG0axDgVdSXV77qQo

To claim this, I am signing this object:

@hamin
hamin / Keybase.md
Created March 20, 2017 20:22
Keybase.md

Keybase proof

I hereby claim:

  • I am hamin on github.
  • I am harisamin (https://keybase.io/harisamin) on keybase.
  • I have a public key ASB9ZTWf0tZzLnIMn6zuuLjj8cZHNKBac988C_912BTPiAo

To claim this, I am signing this object:

// Discussion on how to do custom cropping overlay on UIImageViewPicker
// https://gist.github.com/Raiden996/74ea67db8f17673f1b8b
func navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) {
println("viewcontrollers count: \(navigationController.viewControllers.count)")
if navigationController.viewControllers.count == 3 {
println("viewcontrollers name: \(navigationController.viewControllers[2].classString())")
if (navigationController.viewControllers[2].classString() == "PUUIImageViewController") || (navigationController.viewControllers[2].classString() == "PLUIImageViewController") {
addOverlayToImagePicker(viewController)
@hamin
hamin / mongomapper_replica_sets.rb
Created April 16, 2011 21:52
How to get replica sets to work with MM...just use the Ruby driver!!!!!
# In your config/initializers/mongo.rb where you initialize your connection with Mongo:
MongoMapper.connection = Mongo::Connection.multi([["db3", 27017], ["db3", 27018]])
# of course you can read the replica set info from a simple YAML file.
@hamin
hamin / ByteBuffer.swift
Created July 8, 2016 19:17
ByteBuffer helper class
//
// ByteBuffer.swift
// mpush-client
//
// Created by OHUN on 16/6/3.
// Copyright © 2016年 OHUN. All rights reserved.
//
import Foundation
@hamin
hamin / A.cfg
Last active December 16, 2015 19:19
Fun exercise for Brooks :)
Title 49th parallel
URL http://artsweb.bham.ac.uk/
Domain artsweb.bham.ac.uk
Title ABAA booknet
URL http://abaa.org/
Domain abaa.org
@hamin
hamin / Gemfile
Created January 18, 2013 06:00
Simple faye-websocket leapmotion skeleton client
gem 'faye-websocket', :git => 'git://github.com/faye/faye-websocket-ruby.git'
@hamin
hamin / Person.h
Created August 17, 2012 09:22
Create custom classes by custom classes inheriting from NSFNanoObject
#import "NSFNanoObject.h"
@interface Person : NSFNanoObject
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *location;
@end