Skip to content

Instantly share code, notes, and snippets.

@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@embr
embr / gist:4707996
Created February 4, 2013 17:03
RescueTime Python API Example
# coding: utf-8
import pprint
import pandas as pd
from rescuetime.api.service import Service
from rescuetime.api.access import AnalyticApiKey
s = Service.Service()
k = AnalyticApiKey.AnalyticApiKey(open('rt_key').read(), s)
p = {}
@yanofsky
yanofsky / LICENSE
Last active June 5, 2024 21:51
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@humanium
humanium / oui_parser.py
Created September 25, 2013 15:20
oui.txt parser with csv output
# -*- coding: utf-8 -*-
import csv
fp = open('oui.txt', 'rb')
entries = [{'oui_hex': 'oui_hex',
'oui_base16': 'oui_base16',
'lower_mac_bound': 'lower_mac_bound',
'upper_mac_bound': 'upper_mac_bound',
@cyrq
cyrq / ZeroClipboard.js
Last active September 24, 2018 19:05
DayZ SA GUID fetcher
/*!
* ZeroClipboard
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
* Copyright (c) 2014 Jon Rohan, James M. Greene
* Licensed MIT
* http://zeroclipboard.org/
* v2.1.6
*/
(function(window, undefined) {
"use strict";
@fuzzysteve
fuzzysteve / gist:78c8952afc3d70d5f388
Created November 20, 2014 17:06
An initial draft of a handler for Crest. Market data only at the moment.
<?php
namespace FuzzyCrest;
use FuzzyCrest;
class CrestHandler
{
private $useragent="Fuzzwork Market agent 1.0";
private $expiry=0;
Copy of http://pastebin.com/5HUwk2jA
ABC Radio appears to be using a service from http://newrelic.com. You can get the ten most recently played tracks across their enabled stations here:
http://music.abcradio.net.au/api/v1/plays/search.json
Or you can add these parameters (as their web apps do to generate playlists):
from=yyyy-mm-ddThh:mm:ss.000Z // Date range start in UTC e.g. 2014-04-30T00:00:00.000Z
to=yyyy-mm-ddThh:mm:ss.000Z // Date range end in UTC e.g. 2014-04-30T00:00:00.000Z
@CuriousGnu
CuriousGnu / beezid_scraper.py
Created April 3, 2016 14:15
Beezid.com - Auction Scraper
import pycurl
import json
import time
from StringIO import StringIO
i = 0
bnums = []
while True :
print(str(i))