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
# 10/5/2014 | |
# so if you're using google finance and wanted to export your porfolio, including your transactions to a CSV format -> here is a script that lets you do that. | |
# you can also print the current portflio - located on ofx.security_list | |
# inspired by https://github.com/chrisroos/ofx-to-csv | |
from ofxparse import OfxParser | |
import csv | |
ofx = OfxParser.parse(file('portfo.ofx')) |
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
import fileinput | |
import json | |
for line in fileinput.input(): | |
try: | |
print(json.dumps(json.loads(line))) | |
except: | |
pass |
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 --resolve www.google.com:443:74.125.239.116:443 https://www.google.com |
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
# | |
# AT commands ref :http://www.fccps.cz/img.asp?attid=24590 | |
# credit to: https://gist.github.com/pmarti/11120153 | |
import serial | |
from smspdu import SMS_SUBMIT | |
def send_text(number, text): | |
# encode the SMS | |
p = SMS_SUBMIT.create('sender', number, text) | |
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/bin/env python | |
import serial | |
from datetime import datetime | |
import winsound | |
#import msvcrt | |
ser = serial.Serial("COM4", 9600) | |
while True: | |
s = str(ser.readline()) |
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
ls *.rpm | \ | |
xargs rpm --query --filesbypkg --package | \ | |
grep configure.py |
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
from ghost import Ghost | |
from sys import argv | |
def main(): | |
url = argv[1] | |
path = argv[2] | |
screenshot(url,path) | |
def screenshot(url,path): | |
ghost = Ghost() |
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 -density 600 -colorspace gray input.pdf output_greyscale.pdf |
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
sqlite3 /var/lib/hue/desktop.db | |
UPDATE auth_user SET is_superuser=1 WHERE username='hadoop-user-admin'; | |
UPDATE auth_group SET name='default_group' where id=3; |
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 | |
password="xxxx" | |
for OUTPUT in $(find|grep "\.zip"|cut -c 3-) | |
do | |
length=$(expr length $OUTPUT) | |
addtive=`expr substr $OUTPUT $((length-4)) 1` | |
finalpass="$password$addtive" | |
unzip -P $finalpass $OUTPUT | |
done |
OlderNewer