This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This uses twitter-async from GitHub | |
// Source: https://github.com/jmathai/twitter-async/tree | |
// Documentation: http://wiki.github.com/jmathai/twitter-async | |
include 'EpiOAuth.php'; | |
include 'EpiTwitter.php'; | |
$twitterObj = new EpiTwitter('YourConsumerKey', 'YourConsumerSecret', 'Token', 'TokenSecret'); | |
$params = array('@image' => '@/absolute/path/to/image.jpg'); | |
$uploadResp = $twitterObj->post_accountUpdate_profile_image($params); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert a unix timestamp into a readable date | |
date -d @1252374518 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ease staging of files | |
for i in $(git status | grep -A 10000 "not updated" | grep modified) ; do | |
if [ -f $i ] ; then | |
git diff $i; | |
echo -n "Add this to stage? [y/n]: "; | |
read ans; | |
if [ "$ans" == "y" ] ; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This is a sample function that guarantees unique URLs for frontend assets. | |
* Images for example. | |
* Include this and your users will never re-download an asset they already | |
* have just just because you push a new build. | |
* If including this in your stylesheet then you should set this up in you | |
* should be using something like Amazon Cloud Front to cache a static | |
* version of it. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------- beginning of /dev/log/system | |
D/WifiService( 129): acquireWifiLockLocked: WifiLock{NetworkLocationLocator type=2 binder=android.os.BinderProxy@408bf5f0} Mode: 2 | |
D/WifiService( 129): disable wifi due to updateWifiState | |
D/WifiService( 129): releaseWifiLockLocked: WifiLock{NetworkLocationLocator type=2 binder=android.os.BinderProxy@408bf5f0} Mode: 2 | |
D/WifiService( 129): disable wifi due to updateWifiState | |
D/StatusBarPolicy(32056): hasService()=true ,mDataState=2 ,mPhone.htcModemLinkOn()=false ,mDataActivity=0 | |
D/StatusBarPolicy(32056): slotType[0]=empty | |
D/StatusBarService(32056): updateIcon slot=data_connection index=18 viewIndex=13 old=StatusBarIcon(pkg=com.android.systemui id=0x7f020015 level=0 visible=true num=0 ) icon=StatusBarIcon(pkg=com.android.systemui id=0x7f020015 level=0 visible=true num=0 ) | |
D/WifiService( 129): acquireWifiLockLocked: WifiLock{NetworkLocationLocator type=2 binder=android.os.BinderProxy@408bf5f0} Mode: 2 | |
D/WifiService( 129): disable wifi due to updateWifiState |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class openphoto { | |
exec { "apt-update": | |
command => "/usr/bin/apt-get update", | |
refreshonly => true; | |
} | |
# base | |
package { | |
"exiftran" : | |
ensure => installed, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use the s3:* and/or sdb:* depending on which you'll need | |
# sdb domain prefix can be any string. | |
# s3 bucket names are globally unique | |
# your account id should not have any spaces or dashes | |
{ | |
"Statement": [ | |
{ | |
"Sid": "StmtNNNNNNNNNNNNN", | |
"Action": "s3:*", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = '***'; | |
$user = '***'; | |
$pass = '***'; | |
$dbname = '***'; | |
$owner = '[email protected]'; | |
$conn = mysql_connect($host,$user,$pass); | |
mysql_select_db($dbname); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -c http://download.virtualbox.org/virtualbox/4.1.8/VBoxGuestAdditions_4.1.8.iso | |
sudo umount /mnt | |
sudo mount VBoxGuestAdditions_4.1.8.iso -o loop /mnt | |
sudo sh /mnt/VBoxLinuxAdditions.run |
OlderNewer