Skip to content

Instantly share code, notes, and snippets.

View tylerhall's full-sized avatar

Tyler Hall tylerhall

View GitHub Profile
<?PHP
$ssm = new Sosumi('username', 'password');
$location_data = $ssm->locate();
$ssm->sendMessage('Daisy, daisy...');
<div class="block">
<div class="hd">
<h2>Your Header Content</h2>
</div>
<div class="bd">
<p>Your body content goes here.</p>
</div>
</div>
<div class="block tabs">
<div class="hd">
<ul>
<li class="active"><a href="#">Tab 1</a></li>
<li><a href="#">Tab 2</a></li>
<li><a href="#">Tab 3</a></li>
</ul>
<div class="clear"></div>
</div>
<div class="bd">
<div class="block tabs spaces">
<div class="hd">
<ul>
<li class="active"><a href="#">Tab 1</a></li>
<li><a href="#">Tab 2</a></li>
<li><a href="#">Tab 3</a></li>
</ul>
<div class="clear"></div>
</div>
<div class="bd">
s3up myS3bucket js/somefile.js somefile.js
cd ~/Dropbox
cmd -a -b -c // Single letter flags
cmd -abc // Same as above
ssh your_username@your-home-ip-address -N -f -L 3689:your-home-ip-address:3689
<?PHP
$gc = new GrandCentral('gc_username', 'gc_password');
$gc->call($your_number, $their_number);
<?PHP
$files = scandir(DOC_ROOT . IMG_PATH);
foreach($files as $fn)
{
if(!in_array(substr($fn, -3), array('jpg', 'png', 'gif'))) continue;
$object = IMG_PATH . $fn;
$the_file = DOC_ROOT . IMG_PATH . $fn;
// Only upload if the file is different
if(!$s3->objectIsSame($bucket, $object, md5_file($the_file)))
{