Skip to content

Instantly share code, notes, and snippets.

@starenka
starenka / keypress.js
Created Jan 20, 2011
Opera - gimme my slash back
View keypress.js
/*
* This is Opera user script, place me into ~/.opera/scripts
* You can read more about userjs here http://www.opera.com/docs/userjs/
*
* This listener prevents events fired after keypress.
* Feel free to add more scancodes into the regexp.
* 47 - slash
*
* @author starenka
* @version 0.1
@starenka
starenka / maralik.py
Created Feb 14, 2011
Maralik (DJC) v Py
View maralik.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @author: starenka
# @email: 'moc]tod[liamg].T.E[0aknerats'[::-1]
# @version: 1.0
# @since 2/14/11
# @depends DJC
import random, time, sys, datetime
@starenka
starenka / hgshell.py
Created Feb 15, 2011
Mercurial "shell"
View hgshell.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# simple mercurial shell inspired by "bzr shell"
# @TODO: autocomplete args, aliases
# show repo info
#
# @author: starenka
# @email: 'moc]tod[liamg].T.E[0aknerats'[::-1]
# @version: 1.0
View isitonyet.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# need to check a site if contains a regexp? cron stuff, eh?
#
# @author: starenka
# @email: 'moc]tod[liamg].T.E[0aknerats'[::-1]
# @version: 1.0
# @since 2/28/11
# @depends urlgrabber
View pollock.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# script to forge requests to webapps/polls w/ proxies,ua,postdata...
# f.e to add vote in ip restricted polls
# pollock http://soutez.cenypodlupou.cz/index.php -d'SITE=ajax&url=soutez_hlas&id=105' -l /junk/proxylist -v
#
# you can find proxies f.e via https://gist.github.com/749299
#
# @author: starenka
@starenka
starenka / norespekt.js
Created Mar 15, 2011
get links to Respekt PDFs
View norespekt.js
/*
Extracts links to all available PDFs in Respekt's archive
1) copy the javascript:$... line below
2) go to http://service.ihned.cz/respekt/respekt-v-pdf.php and log yourself in
3) paste the copied line into address bar and hit Enter
4) profit
this is just a js version of this gist https://gist.github.com/750404
*/
View amplion.sh
for i in {1..500}; do rand=`python -c 'from random import choice;import string;print "".join([choice(string.letters+string.digits) for i in range(20)])'`; curl -d "number=1&email=TVUJEMAIL%2B$rand@gmail.com&agreeTerms=on&message=&payment_type=bank+transfer" 'http://amplion.centrum.cz/buy/127?do=saleForm-submit'; done
@starenka
starenka / copywriter.py
Created Jun 1, 2011
Become a copywriter w/ NTLK
View copywriter.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# generates text based on sample text
#
# @author: starenka
# @email: 'moc]tod[liamg].T.E[0aknerats'[::-1]
# @version: 1.0.3
# @since 6/1/11
# @depends nltk, BeautifulSoup
@starenka
starenka / gist:1009323
Created Jun 5, 2011 — forked from dg/gist:1009307
Routing in Django verus Nette Framework
View gist:1009323

DJANGO

In urls.py

    # urls like "articles/2011/tutorial03" or "articles/2011/tutorial03.html"

    urlpatterns = patterns('',
        (r'articles/(?P<year>\d+)/(?P<item>\w+)(\.htm(l)?)?$', 'articles.views.detail'),
    )
@starenka
starenka / sexyposlanec.sh
Created Jun 6, 2011
sexyposlanec.cz pwn
View sexyposlanec.sh
while [ 1 -lt 2 ]; do echo "http://sexyposlanec.cz/index.php?a=hlasovat&plus=2&minus=120"; done | xargs -P10 curl -I