This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo gem uninstall cocoapods | |
sudo gem install cocoapods | |
sudo rm -fr ~/.cocoapods/repos/master | |
pod setup | |
pod install | |
pod update |
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I was unhappy about there was close to no control over the "pageControl" | |
// in scrollableViews, so I hacked my own | |
// ----- | |
// Configuration | |
var pageColor = "#c99ed5"; | |
PagingControl = function(scrollableView){ | |
var container = Titanium.UI.createView({ | |
height: 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var NUMBER_GROUPS = /(-?\d*\.?\d+)/g; | |
var naturalSort = function (a, b) { | |
var aa = String(a).split(NUMBER_GROUPS), | |
bb = String(b).split(NUMBER_GROUPS), | |
min = Math.min(aa.length, bb.length); | |
for (var i = 0; i < min; i++) { | |
var x = parseFloat(aa[i]) || aa[i].toLowerCase(), | |
y = parseFloat(bb[i]) || bb[i].toLowerCase(); |