Skip to content

Instantly share code, notes, and snippets.

@quarkness
quarkness / removepassword.sh
Last active August 29, 2015 14:07
remove password from vodafone pdfs
#!/bin/bash
PASS=12324324
for f in VODA*pdf
do
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPDFPassword="$PASS" -sOutputFile=nopass-$f -c .setpdfwrite -f $f
done
<paper>
<katern number="1">
<sheets>
<sheet>
<pages>
<page>
<number>1</number>
<pdf>178022.pdf</pdf>
</page>
</pages>
Perry rent!
2 ] 301.752532005 | 301.752532005 | 0.00487242096068
3 ] 304.067573786 | 2.31504178047 | 0.635092366057
4 ] 305.694137812 | 1.62656402588 | 0.903908692488
5 ] 306.961749792 | 1.26761198044 | 1.15987020048
6 ] 309.262540817 | 2.30079102516 | 0.639026033134
7 ] 310.732558012 | 1.47001719475 | 1.0001688192
8 ] 311.912728786 | 1.18017077446 | 1.24580729645
9 ] 314.012543917 | 2.09981513023 | 0.700188002606
10 ] 315.621381998 | 1.60883808136 | 0.913867827294
@quarkness
quarkness / __init__.py
Created September 3, 2012 08:49 — forked from nacx/__init__.py
Pluggable command line tool
import os
# Automatically set the __all__ variable with all
# the available plugins.
plugin_dir = "plugins"
__all__ = []
for filename in os.listdir(plugin_dir):
filename = plugin_dir + "/" + filename
import pyqrcode
import csv
stickers = csv.reader(open('/Users/ivo/Downloads/stickers.csv', 'rb'), delimiter=',', quotechar='|')
for row in stickers:
name = row[0]
uri = row[5]
try:
qr_image = pyqrcode.MakeQRImage(uri)
qr_image.save(name + '.png')
@quarkness
quarkness / mobile-headers.sh
Created June 15, 2012 12:03
request headers with iphone / desktop user-agent
#!/bin/sh
echo "iPhone:"
curl -I -H "User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X; nl-nl) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5" $1
echo "Desktop:"
curl -I -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 Safari/534.55.3" $1
@quarkness
quarkness / fbr.php
Created April 6, 2012 07:45
Defacebookappalizer
<?php
if(isset($_POST['u'])) {
$p = parse_url($_POST['u']);
$v = parse_str($p['query']);
Header("Location: $redirect_uri");
}
?>
<form method=post><input name=u><submit></form>
@quarkness
quarkness / ademopoll.py
Created March 9, 2012 12:59
AD Emopoll
import requests
# vote:vote-emo6
# componentId:3221789
# language:nl
headers = {
'Accept':'application/json, text/javascript, */*; q=0.01',
'X-Requested-With': 'XMLHttpRequest',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 Safari/535.11',