Skip to content

Instantly share code, notes, and snippets.

View NickStemerdink's full-sized avatar

Nick Stemerdink NickStemerdink

View GitHub Profile
import {Sql} from "../providers/Sql";
export class ExamplePage {
constructor(private sql: Sql) {
//sql.query(...);
//...
}
}
@NickStemerdink
NickStemerdink / gist:6136215
Created August 1, 2013 23:18
sed camel case to underscore
Command: sed -e 's/\([A-Z]\)/_\l\1/g' -e 's/^_\([a-z]\)/\1/g'
$ echo foo | sed -e 's/\([A-Z]\)/_\l\1/g' -e 's/^_\([a-z]\)/\1/g'
$ echo Foo | sed -e 's/\([A-Z]\)/_\l\1/g' -e 's/^_\([a-z]\)/\1/g'
$ echo SuperFooBar | sed -e 's/\([A-Z]\)/_\l\1/g' -e 's/^_\([a-z]\)/\1/g'
@NickStemerdink
NickStemerdink / gist:6129954
Created August 1, 2013 09:43
Run composer.phar with the specified php binary
php53 `which composer.phar`
@NickStemerdink
NickStemerdink / Command
Last active May 8, 2017 14:26
Install newer PHP version with the same modules as used in the current version
# Example: installing PHP71 with the same modules as used in PHP70
$ sudo port install `port installed|grep php70|awk '{print $1}'|sed "s/70/71/"`