Skip to content

Instantly share code, notes, and snippets.

View willwade's full-sized avatar
🌏
Working on dasher and a lot of Ace hardware projects

will wade willwade

🌏
Working on dasher and a lot of Ace hardware projects
View GitHub Profile
@willwade
willwade / batch_pandoc.rb
Created November 16, 2017 13:29 — forked from craigeley/batch_pandoc.rb
Batch convert files in a folder with Pandoc
#!usr/bin/ruby
# Change the file extensions below with what you are converting from and to
extFrom = '.html'
extTo = '.md'
files = Dir.glob("*#{extFrom}")
name = ''
base = ''
files.each do |file|
@willwade
willwade / 03_s3fs.config
Last active February 11, 2020 08:13 — forked from mattzuba/03_s3fs.config
use s3fs for a node elasticbeanstalk app. Note the forked differences to the PHP one from @mattzuba - notably env vars are not available
packages:
yum:
gcc: []
libstdc++-devel: []
gcc-c++: []
fuse: []
fuse-devel: []
libcurl-devel: []
libxml2-devel: []
openssl-devel: []
#!/bin/bash
MONGODUMP_PATH="/usr/bin/mongodump"
MONGO_HOST="172.31.22.248"
MONGO_PORT="27000"
MONGO_DATABASE="speechbubble"
#Force file syncronization and lock writes
mongo $MONGO_HOST:$MONGO_PORT/admin --eval "printjson(db.fsyncLock())"
@willwade
willwade / slack.py
Created January 29, 2015 20:48 — forked from TheWaWaR/slack.py
#coding: utf-8
import json
import requests
class Slack(object):
"""
References:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
pip install networkx distance pattern
In Flipboard's article[1], they kindly divulge their interpretation
of the summarization technique called LexRank[2].
@willwade
willwade / gists.py
Created December 16, 2012 22:58 — forked from sbp/gists.py
#!/usr/bin/env python
import sys, os, urllib, json
user = sys.argv[1]
u = urllib.urlopen('http://gist.github.com/api/v1/json/gists/' + user)
bytes = u.read()
u.close()
gistdir = user + '-gists'