Skip to content

Instantly share code, notes, and snippets.

View BenjaminKobjolke's full-sized avatar

Benjamin Kobjolke BenjaminKobjolke

View GitHub Profile
curl -L "http://dummyimage.com/600x400/000/fff&text=DummyImage%20[01-10]" -o image_#1.png
curl -L "https://graph.facebook.com/[1-100000000]/picture?width=160&height=160" -o "facebook_user_#1.jpg"
http://toddmotto.com/everything-about-custom-filters-in-angular-js/
app.filter('startsWithLetter', function () {
return function (items, letter) {
var filtered = [];
var letterMatch = new RegExp(letter, 'i');
for (var i = 0; i < items.length; i++) {
var item = items[i];
if (letterMatch.test(item.name.substring(0, 1))) {
filtered.push(item);
//The parenthesis in the regex creates a captured group within the quotes
var myRegexp = /[^\s"]+|"([^"]*)"/gi;
var myString = 'single words "fixed string of words"';
var myArray = [];
do {
//Each call to exec returns the next regex match as an array
var match = myRegexp.exec(myString);
if (match != null)
{
@BenjaminKobjolke
BenjaminKobjolke / gist:8b194a59185ad21eba27
Last active August 29, 2015 14:05
my favourite cURL commands #commandline
create dummy images
curl -L "http://dummyimage.com/600x400/000/fff&text=DummyImage%20[01-10]" -o image_#1.png
get page headers
curl --head http://google.com
send parameters to page
curl.exe -L -G "http://yoururl.com" --data-urlencode "text=DESIGN6 daily backup started"
send formdata & files to page
@BenjaminKobjolke
BenjaminKobjolke / test.snip
Last active August 29, 2015 14:03
Android ADB Commands #commandline
Restart ADB Server
adb kill-server && adb start-server
app id = de.xida.example
install:
adb install yourapk.apk
uninstall: