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 program uploads to google storage using boto and eventlet all the jpg files of a selected folder | |
import eventlet | |
bcon = eventlet.import_patched("boto.gs.connection") | |
import glob | |
FOLDER = "/Users/myself/Documents/" # replace this with your chosen folder | |
BUCKET_NAME = "whateveryourbucketname" # replace this with your bucket name | |
def upload(myfile): | |
c = bcon.GSConnection() |
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
onkeydown="return jQuery(this).val().length < 144" |
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
# delete mail from some@email.com | |
mailq | grep some@email.com | cut -d" " -f1 |tr -d '*' | xargs -L1 postsuper -d |
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 | |
# ~/bin/gencss.sh | |
# specify a prefix or suffix using | |
# PREFIX="#" SUFFIX=" .image" ~/bin/gencss.sh *.png | |
FORMAT="$PREFIX%t$SUFFIX { background: url('%i') no-repeat center center; width: %wpx; height: %hpx; }" | |
until [ -z "$1" ] # Until all parameters used up . . . | |
do |
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
> var t = "inventory/coisa" | |
> t.split("/") | |
[ 'inventory', 'coisa' ] | |
> var t1 = "inventory" | |
> t1.split("/") | |
[ 'inventory' ] |
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
postcat -q 3AED88366B | head --lines 100 |
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
perl -MCPAN -e "CPAN::Shell->force(qw(install IO::Socket::SSL));" |
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
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "XBMC.Play", "params":{ "file" : "plugin://plugin.video.youtube/?action=play_video&videoid=VIDEOIDFROMYOUTUBEURL" }, "id": 1}' http://xbmc:8080/jsonrpc |
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
#!/usr/local/bin/python | |
#coding: utf-8 | |
TRANSMISSION_HOST='xbmc' | |
DOWNLOAD_DIR='/Users/guigouz/tmp/Downloads' | |
# | |
# Processa um arquivo rar, inicia o download do filme e copia a legenda junto com o avi | |
# | |
import os, sys, rarfile, transmissionrpc, base64, os.path |
OlderNewer