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
git filter-branch -f --index-filter 'git rm -r -f --ignore-unmatch <FILE_TO_REMOVE>' HEAD |
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
import Foundation | |
public extension NSDate { | |
public class func ISOStringFromDate(date: NSDate) -> String { | |
var dateFormatter = NSDateFormatter() | |
dateFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") | |
dateFormatter.timeZone = NSTimeZone(abbreviation: "GMT") | |
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS" | |
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
// https://en.wikipedia.org/wiki/Fibonacci_number | |
// 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 ... | |
func fib(n:Int)->Int { | |
if n > 2 { | |
return fib(n-1) + fib(n-2) | |
} else { | |
return n | |
} | |
} |
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
NSDictionary *dict = @{@"a":@1, @"b":@3, @"z":@24}; | |
NSArray *sortedArray = [dict keysSortedByValueUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { | |
return [obj1 integerValue] < [obj2 integerValue]; | |
}]; | |
NSLog(@"dict: %@", sortedArray); |
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
// Load Wi-Fi library | |
#include <ESP8266WiFi.h> | |
// Replace with your network credentials | |
const char* ssid = "edmonds"; | |
const char* password = "jennyjenny"; | |
WiFiServer server(80); |
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
// Load Wi-Fi library | |
#include <ESP8266WiFi.h> | |
// Replace with your network credentials | |
const char* ssid = "<YOUR WIFI NAME HERE>"; | |
const char* password = "<YOUR WIFI PASSWORD HERE>"; | |
// Load Wi-Fi library |