Commit Message Conventions
These rules are adopted from the AngularJS commit conventions.
<details> | |
<summary>Results</summary> | |
``` | |
``` | |
</details> |
{ | |
"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" | |
} |
#!/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 |
These rules are adopted from the AngularJS commit conventions.
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 |
- (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]; | |
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 |
git show-ref --tags | |
git format-patch -n --stdout sha >file | |
git am file |
#!/bin/sh | |
# Script for managing build and version numbers using git and agvtool. | |
# Change log: | |
# v1.0 18-Jul-11 First public release. | |
# v1.1 29-Sep-12 Launch git, agvtool via xcrun. | |
version() { |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7531" systemVersion="14D131" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES"> | |
<dependencies> | |
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7520"/> | |
</dependencies> | |
<customFonts key="customFonts"> | |
<mutableArray key="FreightSansPro-Book.otf"> | |
<string>FreightSansProBook-Regular</string> | |
</mutableArray> | |
</customFonts> |