Skip to content

Instantly share code, notes, and snippets.

@durple
durple / nitro_repos.py
Created October 26, 2016 23:44 — forked from bparli/nitro_repos.py
Scripts to migrate repos from github enterprise to github public
#!/usr/bin/python
from github import Github
import os, subprocess, sys, getopt
from sys import argv
with open("repos") as fp:
repos = [x.strip('\n') for x in fp.readlines()]
#repos = ["nitro-sfdc"]
user = ''
pw = ''

Keybase proof

I hereby claim:

  • I am durple on github.
  • I am durple (https://keybase.io/durple) on keybase.
  • I have a public key whose fingerprint is 9E00 B670 9DBE 5C13 8F60 2CE6 3A4A A5AC 2C1A 498B

To claim this, I am signing this object:

@durple
durple / go-nsq_reader.go
Created August 2, 2014 05:54
simple go-nsq reader example
package main
import (
"fmt"
"github.com/bitly/go-nsq"
)
func loop(inChan chan *nsq.Message) {
for msg := range inChan {
fmt.Println(string(msg.Body) + "\n")
@durple
durple / better-twitter-entities.js
Created April 27, 2014 06:12
A better javascript parser for Twitter Entities
/*
* better-twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
*
* See the documentation here: http://dev.twitter.com/pages/tweet_entities
* Basically, add ?include_entities=true to your timeline call
* This is an extension of Wade Simmons' twitter-entities.js gist
* https://gist.github.com/wadey/442463
*
@durple
durple / sslpatch
Last active August 29, 2015 13:58 — forked from coderanger/README.md
SSL Patch
# How to patch Ubuntu for Heartbleed
sudo apt-get update
sudo apt-get install -y libssl1.0.0 openssl
openssl version -a
sudo lsof -n | grep ssl | grep DEL
@durple
durple / NYTTrendingHackNY
Last active December 24, 2015 04:29
HackNY API examples
API
https://www.cascadeproject.com/api.pdf
Top trending
https://api.cascadeproject.com/dashboard/nyt/top/stories/tweets/1h?user=hackday&key=2f3b8a0eab489b0dd14f1959e85f8aca
https://api.cascadeproject.com/dashboard/nyt/top/stories/clicks/1h?user=hackday&key=2f3b8a0eab489b0dd14f1959e85f8aca
https://api.cascadeproject.com/dashboard/nyt/top/stories/tweets/12h?user=hackday&key=2f3b8a0eab489b0dd14f1959e85f8aca
https://api.cascadeproject.com/dashboard/nyt/top/stories/clicks/12h?user=hackday&key=2f3b8a0eab489b0dd14f1959e85f8aca
https://api.cascadeproject.com/dashboard/nyt/top/stories/tweets/24h?user=hackday&key=2f3b8a0eab489b0dd14f1959e85f8aca
https://api.cascadeproject.com/dashboard/nyt/top/stories/clicks/24h?user=hackday&key=2f3b8a0eab489b0dd14f1959e85f8aca
@durple
durple / wp2tumblr
Created August 24, 2011 03:11 — forked from mwunsch/wp2tumblr
#!/usr/bin/env ruby
## WP2TUMBLR: WordPress 2 Tumblr Importing tool
##
## Usage: wp2tumblr [OPTION] WORDPRESS_XML_FILE
##
## Import the WORDPRESS_XML_FILE to a Tumblr blog.
## Provide `--group` option to publish to a group.
## This could take a long time...
##
## To install, download the script and chmod to 755.