These rules are adopted from the AngularJS commit conventions.
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
<details> | |
<summary>Results</summary> | |
``` | |
``` | |
</details> |
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
{ | |
"data": [], | |
"meta": { "count": 0 }, | |
"links": { | |
"first": "/1/edges?page=1&page_size=65535", | |
"last": "/1/edges?page=1&page_size=65535", | |
"next": null, | |
"prev": null, | |
"self": "/1/edges?page=1&page_size=65535" | |
} |
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
#!/bin/bash | |
if [ "$#" -lt 3 ]; then | |
echo "Usage: ./run_oncloud.sh project-name bucket-name classname [options] " | |
echo "Example: ./run_oncloud.sh cloud-training-demos cloud-training-demos CurrentConditions --bigtable" | |
exit | |
fi | |
PROJECT=$1 | |
shift | |
BUCKET=$1 | |
shift |
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 | |
extension NSMutableOrderedSet { | |
struct rb { | |
static func insertSorted<T>(element: T, inTo set:NSMutableOrderedSet, isLessThan: (_ lhs:T,_ rhs:T) -> Bool){ | |
for i in 0 ..< set.count { | |
let x = set[i] as! T | |
if !isLessThan(x,element) { | |
set.insert(element, at: i) | |
return |
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
for(NSString *fontfamilyname in [UIFont familyNames]) | |
{ | |
if (![fontfamilyname containsString:@"elvetica"]) { | |
continue; | |
} | |
NSLog(@"family:'%@'",fontfamilyname); | |
for(NSString *fontName in [UIFont fontNamesForFamilyName:fontfamilyname]) | |
{ | |
NSLog(@"\tfont:'%@'",fontName); | |
} |
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
no separators for empty cells | |
tableView.tableFooterView = UIView(frame: CGRectZero) | |
//http://stackoverflow.com/questions/25770119/ios-8-uitableview-separator-inset-0-not-working | |
// From End To end | |
cell.separatorInset = UIEdgeInsetsZero; | |
cell.layoutMargins = UIEdgeInsetsZero; | |
cell.preservesSuperviewLayoutMargins = NO; | |
// invisible |
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
- (void)outputStreamToFileAtPathDemo | |
{ | |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *documentsDirectory = [paths objectAtIndex:0]; | |
NSString *file = [documentsDirectory stringByAppendingPathComponent:@"foo.dat"]; | |
NSLog(@"file: %@", file); | |
NSOutputStream *output = [NSOutputStream outputStreamToFileAtPath:file append:NO]; | |
[output open]; | |
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
The ' ## ' preprocessing operator performs token pasting. | |
#define macro(x) ## x \\gets replaced by the value of x | |
Stringification # x makes x in to a string so @#x in objective-c |
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 show-ref --tags | |
git format-patch -n --stdout sha >file | |
git am file |
NewerOlder