Skip to content

Instantly share code, notes, and snippets.

View zealoushacker's full-sized avatar

Alex Notov zealoushacker

View GitHub Profile
@zealoushacker
zealoushacker / closure_containing_pure_function.rb
Created January 14, 2014 06:45
A closure containing a pure function
=begin
Functions containing no free/unbound variables are called pure functions.
Functions containing one or more free variables are called closures.
Adapted from the quick exercise in https://leanpub.com/javascript-allonge/read#closures
In turn, this is adapted from https://gist.github.com/zealoushacker/8091614
If pure functions can contain closures, can a closure contain a pure function?
Attempt to compose a closure that contains a pure function.

##Goals 01/07/2014

###git and github

  • Understand the purpose of version control systems
  • Learn how to manage files/projects with git and github
  • Understand git branching
  • Understand how to collaborate with others

###file i/o, arrays, hashes

@zealoushacker
zealoushacker / lesson_on_comp_thinking.md
Last active January 2, 2016 08:48
Computational thinking & programmer mindset This is a lesson I had prepared for General Assembly's IWD program day 1.

Mapping problems into computational framework

Making the computer do what you want it to do

Let's take an example of a body wash bottle's instructions

Instructions for using Aveeno active naturals body wash:

  • Squeeze onto a wet pouf or washcloth
  • Work into a rich creamy lather

iBeacon

Region Monitoring

Same Core Location APIs as geofences

Beacon regions

Passbook relevance

@zealoushacker
zealoushacker / iOS7_tips_and_tricks.md
Created December 25, 2013 08:33
iOS7 development tips & tricks

#Key Notes from Hidden iOS 7 Development Gems

##Xcode

###Method completion (class implementation)

Type the first few characters of a method, without the return type to get the list of method signatures. This is awesome, because only the methods that make sense for this class implemetation will be listed!

####Except, with IBAction methods For IBAaction methods, start typing the first few characters of (IBAction)selector...

@zealoushacker
zealoushacker / crucial_iOS7_changes.md
Last active January 1, 2016 08:39
Crucial iOS7 changes
@zealoushacker
zealoushacker / pure_function_within_a_closure.js
Created December 23, 2013 04:24
A closure containing a pure function in js
/*
Functions containing no free/unbound variables are called pure functions.
Functions containing one or more free variables are called closures.
Adapted from the quick exercise in https://leanpub.com/javascript-allonge/read#closures
If pure functions can contain closures, can a closure contain a pure function?
Attempt to compose a closure that contains a pure function.
Many thanks to @raganwald!
@zealoushacker
zealoushacker / create_sublime_alias
Last active December 31, 2015 19:29
sublime alias for your terminal
If you are on a mac, please follow these instructions to get your sublime link set up appropriately.
Run this command if you have sublime text 2:
echo "alias subl='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'" >> ~/.bash_profile
Or, if you have sublime text 3, run this command:
echo "alias subl='/Applications/Sublime\ Text\ 3.app/Contents/SharedSupport/bin/subl'" >> ~/.bash_profile
@zealoushacker
zealoushacker / gist:4047959
Created November 9, 2012 20:16
balanced card-declined-generic
{
"status": "Payment Required",
"category_code": "card-declined",
"additional": "Generic decline - No other information is being provided by the issuer.",
"status_code": 402,
"category_type": "banking",
"extras": {},
"request_id": "OHMf496075c292211e2ad35026ba7d31e6f",
"description": "R530: Do Not Honor. Your request id is OHMf496075c292211e2ad35026ba7d31e6f."
}
@zealoushacker
zealoushacker / gist:3970953
Created October 29, 2012 01:55
Explanation of hex colors.
HTML colors are broken into 3 components:
R: Red
G: Green
B: Blue
These 3 components may be represented in hexadecimal.
A hexadecimal representation of the 3 components is called a triplet, or group of 3 numbers.
R G B R G B