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
| import sys | |
| import os | |
| print "Create New Domain!" | |
| dom = raw_input("DomainName: ") | |
| print "Creating domain", dom | |
| print "Creating folder /var/www/" + dom + '/html' |
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
| import os, time | |
| import glob | |
| #Define Pictures Folder | |
| folder = '/path/' | |
| pics = glob.glob(folder+"*.jpg") | |
| #Get Folder Char Number | |
| x = folder.count("") |
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 | |
| sync; echo 3 > /proc/sys/vm/drop_caches |
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 | |
| #------------------------------------------------------- | |
| # Daniel Spillere Andrade - www.danielandrade.net | |
| # Script to Create Images for websites | |
| #------------------------------------------------------- | |
| #-- VARIABLES --# | |
| BIG=960000 |
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
| ################################################################################################ | |
| # | |
| # Script to organize pictures uploaded from Mobile Devices to Dropbox's Camera Upload folder | |
| # | |
| # Daniel Spillere Andrade - www.danielandrade.net | |
| # | |
| ################################################################################################ | |
| import os, time | |
| import glob |
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
| import serial | |
| import time | |
| import _winreg as winreg | |
| import itertools | |
| import datetime | |
| def enumerate_serial_ports(): | |
| """ Uses the Win32 registry to return an | |
| iterator of serial (COM) ports | |
| existing on this computer. |
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
| Recursively remove .* files | |
| find . -name ._\* -print0 | xargs -0 rm -f | |
| individual folder: | |
| for f in *.flac; do ffmpeg -i "$f" -ab 320k "${f%.flac}.mp3" && rm "$f"; done | |
| find . -type f -name "*.flac" -exec bash -c 'for f; do ffmpeg -i "$f" -ab 320k "${f%.flac}.mp3" && rm "$f"; done' _ {} + | |
| for i in */*/*.flac; do ffmpeg -i "$i" -ab 320k "${i%.flac}.mp3" && rm "$i"; done |
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
| #Python Parser | |
| import os | |
| import sys | |
| import re | |
| #-----[ Config ]------------------------------------- | |
| baseFile = 'base_main_Rate8.cfg' |
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
| #Install on windows http://apprenticealf.wordpress.com/2011/01/14/windows-python-ebooks-and-drm/ | |
| from Crypto.Cipher import AES | |
| import base64 | |
| AES.key_size=128 | |
| iv="12345678abcdefgh" | |
| key="12345678abcdefgh12345678abcdefgh" | |
| crypt_object=AES.new(key=key,mode=AES.MODE_CBC,IV=iv) |
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
| update catalog_product_entity_decimal | |
| set value = value*1.2 | |
| where attribute_id = 75 and | |
| entity_id IN (select product_id from catalog_category_product | |
| where category_id = X); |