Skip to content

Instantly share code, notes, and snippets.

View BenjaminKobjolke's full-sized avatar

Benjamin Kobjolke BenjaminKobjolke

View GitHub Profile
$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);
xcopy ..\*.md tmp\
#!/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
@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;
@BenjaminKobjolke
BenjaminKobjolke / Unity\ParticleSystems
Created March 24, 2021 07:51
Particle Systems #unity
On/Off
particleSystem.Play();
particleSystem.Stop();