Skip to content

Instantly share code, notes, and snippets.

View futuregraph's full-sized avatar
💭
👁

futuregraph

💭
👁
View GitHub Profile
@futuregraph
futuregraph / README.md
Created April 22, 2017 07:49 — forked from renchap/README.md
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {

macOS 10.12 Sierra Setup

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your o

@futuregraph
futuregraph / clean_node_modules.sh
Created April 3, 2017 23:13
remove all node_modules recursively
find . -name "node_modules" -type d -exec rm -rf '{}' +
@futuregraph
futuregraph / remove_node_modules.sh
Created December 9, 2016 03:11
remove node_modules from git history
git filter-branch --tree-filter 'rm -rf node_modules' --prune-empty HEAD
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
git gc
@futuregraph
futuregraph / encode_to_x264.sh
Last active November 27, 2016 12:22
useful snippet to encode all .MOV files in folder to x264
find . -iname '*.MOV' -exec sh -c 'ffmpeg -i $1 -c:v libx264 -crf 23 -c:a aac -strict experimental -b:a 192k $1.mp4' _ {} \;
@futuregraph
futuregraph / index.html
Created September 22, 2015 22:25 — forked from jdarling/index.html
Reuseable D3 MindMap (left/right tree)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
.node circle {
cursor: pointer;
fill: #fff;
stroke: steelblue;