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
[ | |
{ | |
"id": "2fbe43a0.aa5a5c", | |
"type": "tab", | |
"label": "NVR Alarm", | |
"disabled": false, | |
"info": "" | |
}, | |
{ | |
"id": "418f6f82.2d31a", |
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
#decode torrent file | |
import os | |
import sys | |
def decode(f): | |
c = f.read(1) | |
if c.isdigit(): #string | |
len = dec_size(f,c) | |
return f.read(len) |
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 string | |
import random | |
''.join(random.SystemRandom().choice(string.ascii_letters) for _ in range(64)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
User nobody | |
Group nogroup | |
Port 8888 | |
Listen 127.0.0.1 | |
Timeout 600 | |
DefaultErrorFile "/usr/share/tinyproxy/default.html" | |
StatFile "/usr/share/tinyproxy/stats.html" | |
Logfile "/var/log/tinyproxy/tinyproxy.log" | |
LogLevel Info | |
PidFile "/var/run/tinyproxy/tinyproxy.pid" |
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
for %%F in (*.m4a) do ffmpeg -i "%%F" -ab 128k -map_metadata 0 "%%~nF.mp3" |
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
set objShell = CreateObject("shell.application") | |
set objFolder = objShell.NameSpace(Wscript.Arguments(0)) | |
For Each fileName in objFolder.Items | |
set objFolderItem = objFolder.ParseName(fileName) | |
size = objFolder.GetDetailsOf(objFolderItem, 1) | |
length = objFolder.GetDetailsOf(objFolderItem, 27) | |
height = objFolder.GetDetailsOf(objFolderItem, 283) | |
width = objFolder.GetDetailsOf(objFolderItem, 285) | |
Wscript.Echo fileName & vbTab & size & vbTab & length & vbTab & height & vbTab & width |
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
-- Retrieve all emails for sugarcrm users | |
SELECT user_name, email_addresses.email_address | |
FROM `users` | |
JOIN email_addr_bean_rel on bean_id = users.id | |
JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id | |
WHERE status = 'Active' and user_hash is not null and users.deleted = 0 and email_addresses.invalid_email = 0 | |
order by user_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
import feedparser | |
import sys | |
import urllib2 | |
import os.path | |
''' | |
Download all mp3 from rss podcast in current directory | |
program usage: | |
python download.py http://url/podcast.rss | |
''' |
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
UBUNTU:~/avrdude/avrdude-6.2$ sudo apt-get install bison flex libusb-dev | |
UBUNTU:~/avrdude/avrdude-6.2$ ./configure --host=i586-w32-mingw32 CC=i586-mingw32msvc-gcc | |
UBUNTU:~/avrdude/avrdude-6.2$ make | |
NewerOlder