Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Kobjolke BenjaminKobjolke

View GitHub Profile
View copyloop.sh
#!/bin/bash
DIRPATH=$(dirname "$0")
FILEPATH="${DIRPATH}/Sample-UISearchController/Resources/assets/images/xida_logo"
for i in `seq 1 30000`;
do
cp "${FILEPATH}.png" "${FILEPATH}${i}.png"
done
View Web\PHP\XML & RSS\read xml file.php
$c = curl_init();
$url = getfile($twitter_id . ".xml");
curl_setopt($c, CURLOPT_URL, $url);
//e cho "http://twitter.com/statuses/user_timeline/" . $twitter_id . ".xml" . "<br>";
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($c, CURLOPT_TIMEOUT, 5);
$response = curl_exec($c);
$responseInfo = curl_getinfo($c);
View Actionscript\Strings\remove whitespaces.as
cString = cString.split(" ").join("_");
View Desktop\SVN\merge branch intro trunk.snip
navigate to trunk url
svn merge -r368:369 https://branchurl
this will merge revision 369 (but it seems svn merge always wants to have two revision numbers)
View Web\PHP\XML & RSS\xml output.php
$returnXml = '<?xml version="1.0" encoding="utf-8"?>';
header("Content-type: text/xml; charset: utf-8");
ob_start();
echo $returnXml;
ob_flush();
exit;
View Desktop\SVN\svn latest.snip
svnlook youngest e:\Repositories\repositoryname
View Desktop\Windows\Command line\cURL\dummyimages.snip
curl -L "http://dummyimage.com/600x400/000/fff&text=DummyImage%20[01-10]" -o image_#1.png
View Desktop\Windows\Command line\cURL\download facebook profile images.snip
curl -L "https://graph.facebook.com/[1-100000000]/picture?width=160&height=160" -o "facebook_user_#1.jpg"
You can’t perform that action at this time.