Skip to content

Instantly share code, notes, and snippets.

@judotens
judotens / kapanlagi.py
Last active December 30, 2015 02:59
Find Indonesian song and lyrics from KapanLagi
from StringIO import StringIO
import gzip, BeautifulSoup, sys, urllib2, urllib
main_url = "http://lirik.kapanlagi.com"
def buka(url):
request = urllib2.Request(url)
request.add_header('Accept-encoding', 'gzip')
response = urllib2.urlopen(request)
if response.info().get('Content-Encoding') == 'gzip':
buf = StringIO( response.read())
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@judotens
judotens / clean.sh
Last active August 29, 2015 14:02
Botnet .IptabLes & .IptabLex cleaner
# botnet .IptabLes & .IptabLex cleaner
# tested on my ec2 based on Amazon AMI
# here i attached my version -> http://filebin.ca/1PPeWObrq63q/IptabLesx.zip
# https://malwr.com/analysis/MDIyMmEzZmU1ZjIzNGU4ZGIxNTQ1NmViNmYxNjc0NTQ/
# @judotens
# 1.1M
getsetup_sum="27fff3d371fff67bf14cb91e7b1f6623"
@judotens
judotens / README.txt
Last active June 19, 2021 17:38
Crosswords Generator
Best paired with these JS:
http://www.jesseweisbeck.com/crossword/
Usage: crossword.py [options]
Options:
-h, --help show this help message and exit
-r ROWS, --rows=ROWS Set row height
-c COLUMNS, --columns=COLUMNS
Set column width
@judotens
judotens / namecheap.py
Last active December 3, 2023 11:53
Export Namecheap domain zones without API
pip install selenium
python namecheap.py <namecheap_account> <namecheap_password> <domain>
@judotens
judotens / bash.py
Last active March 7, 2022 00:54
Celery Run Bash Project
from __future__ import absolute_import
import os
from subprocess import Popen, PIPE
import datetime
import time
from celery import Celery
from celery import states
from os.path import dirname, join