Skip to content

Instantly share code, notes, and snippets.

View BenjaminKobjolke's full-sized avatar

Benjamin Kobjolke BenjaminKobjolke

View GitHub Profile
@BenjaminKobjolke
BenjaminKobjolke / Unity\ParticleSystems
Created March 24, 2021 07:51
Particle Systems #unity
On/Off
particleSystem.Play();
particleSystem.Stop();
@BenjaminKobjolke
BenjaminKobjolke / Unity\Cast Enum
Last active March 24, 2021 07:45
Cast enum #unity
int numWeapons = System.Enum.GetValues(typeof(WeaponType).Length;
// Cast weapon to int to do math on it
int wt = (int)weaponType;
wt++;
if( wt == numWeapons) wt = 0;
weaponType = (WeaponType) wt;
#!/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
xcopy ..\*.md tmp\
$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);
@BenjaminKobjolke
BenjaminKobjolke / Desktop\SVN\merge branch intro trunk.snip
Last active August 29, 2015 14:07
Merge Branch revision intro trunk
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)
$returnXml = '<?xml version="1.0" encoding="utf-8"?>';
header("Content-type: text/xml; charset: utf-8");
ob_start();
echo $returnXml;
ob_flush();
exit;
@BenjaminKobjolke
BenjaminKobjolke / Desktop\SVN\svn latest.snip
Last active August 29, 2015 14:07
Get latest revision number
svnlook youngest e:\Repositories\repositoryname
curl -L "http://dummyimage.com/600x400/000/fff&text=DummyImage%20[01-10]" -o image_#1.png