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
// ==UserScript== | |
// @name Tweetdeck T.co bypass | |
// @namespace http://userscripts.org/users/192333 | |
// @version 1 | |
// @include http*://*twitter.com/* | |
// @grant GM_deleteValue | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @grant GM_info | |
// ==/UserScript== |
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": "106976563522_10152113375228523", | |
"from": { | |
"category": "Media/news/publishing", | |
"name": "The Next Web", | |
"id": "106976563522" | |
}, | |
"message": "Bored of Instagram? Check out Molome, where photos have stickers. http://tnw.co/1kygbfx", | |
"picture": "https://fbcdn-photos-d-a.akamaihd.net/hphotos-ak-prn2/1508006_10152113374233523_1837944042_s.png", | |
"link": "https://www.facebook.com/photo.php?fbid=10152113374233523&set=a.297026458522.179219.106976563522&type=1&relevant_count=1", |
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": "321611004898", | |
"feed": { | |
"data": [ | |
{ | |
"id": "321611004898_10152481350444899", | |
"from": { | |
"category": "Non-profit organization", | |
"name": "TiE Mumbai", | |
"id": "321611004898" |
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
start on startup | |
script | |
echo "978" > /sys/class/backlight/intel_backlight/brightness | |
end script |
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
#!/usr/bin/ruby | |
# | |
# I recommend using Pocket to do the export. It works better than the browser extensions. | |
require 'rubygems' | |
require 'htmlentities' | |
require 'csv' | |
# CHANGE THIS | |
input_file = '/path/to/passwords.csv' |
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
#!/usr/bin/env python | |
# Generated by BigMap 2. Permalink: http://bigmap.osmz.ru/bigmap.php?xmin=12200&xmax=12231&ymin=7120&ymax=7143&zoom=14&scale=256&tiles=mapnik | |
import io, urllib2, datetime, time, re, random | |
from PIL import Image, ImageDraw | |
# ^^^^^^ install "python-pillow" package | pip install Pillow | easy_install Pillow | |
(zoom, xmin, ymin, xmax, ymax) = (14, 12200, 7120, 12231, 7143) | |
layers = ["http://tile.openstreetmap.org/!z/!x/!y.png"] | |
attribution = 'Map data (c) OpenStreetMap' |
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
sudo apt-get install autoconf libtool build-essential libjpeg-dev pkg-config sqlite3 libsqlite3-dev libcurl3 curl libcurl4-openssl-dev zlib1g-dev libzrtpcpp-dev libasound2-dev libogg-dev libvorbis-dev libperl-dev libexpat1-dev libssl-dev libtiff4-dev libx11-dev unixodbc-dev libpcre-dev libpcre3-dev libexpat1-dev libssl-dev libtiff4-dev libx11-dev unixodbc-dev speex libspeexdsp-dev libldns-dev libedit-dev |
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
from django.db import models | |
class SQLSumCase(models.sql.aggregates.Aggregate): | |
is_ordinal = True | |
sql_function = 'SUM' | |
sql_template = "%(function)s(CASE WHEN %(when)s THEN %(field)s ELSE 0 END)" | |
def __init__(self, col, **extra): | |
if isinstance(extra['when'], basestring): | |
extra['when'] = "%s" % extra['when'] |
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
explain analyze | |
SELECT tmp_table.tid, | |
tmp_table.screen_name, | |
tmp_table.text | |
FROM | |
(SELECT tid, | |
data->'user'->>'screen_name' AS screen_name, | |
data->>'text' AS text, | |
ST_GeomFromText('POINT(' || CAST(data#>>'{geo,coordinates,1}' as varchar) || ' ' || CAST(data#>>'{geo,coordinates,0}' as varchar) || ')', 4326) AS geom | |
FROM tweet |
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 math | |
def find_next(n): | |
try: | |
n = int(n) | |
except: | |
return n | |
if n < 10: | |
return n |