Skip to content

Instantly share code, notes, and snippets.

View thbar's full-sized avatar

Thibaut Barrère thbar

View GitHub Profile
@thbar
thbar / README.md
Created April 28, 2016 20:01 — forked from joakimk/README.md
CircleCI elixir build example

This runs a build for a small elixir (phoenix) project in about 40 seconds by caching as much of the compiled files as possible.

We've been using this for months in multiple projects without any issues. Please ping be if there is any issues with this script and I'll update it.

It should be generic enough to work on any elixir app using mix.

If you have a elixir_buildpack.config, then enable that section in the build script to keep versions in sync!

@thbar
thbar / up-and-running-with-edeliver-on-do.md
Created January 29, 2016 22:40 — forked from mattweldon/up-and-running-with-edeliver-on-do.md
Getting Elixir / Phoenix running on Digital Ocean with edeliver

Build Server

  • Go to Digital Ocean
  • Create new droplet
  • London
  • Ubuntu
  • No apps
  • Add SSH keys
#encoding: utf-8
# This HACK imports SEPA Mandates from a CSV file to
# Crédit Agricole SEPA System via their HTML API. :)
#
# Good luck with this!
#
require 'mechanize'
require 'virtus'
@thbar
thbar / README.md
Last active August 29, 2015 14:21 — forked from mtowers/README.md

Description

A Dashing widget for displaying a graph of metrics data from Librato

Dependencies

httparty

Add it to dashing's gemfile:

@thbar
thbar / config.js
Last active August 29, 2015 14:20 — forked from goyox86/config.js
/*
Graphite Required Variables:
(Leave these unset to avoid sending stats to Graphite.
Set debug flag and leave these unset to run in 'dry' debug mode -
useful for testing statsd clients without a Graphite server.)
graphiteHost: hostname or IP of Graphite server
graphitePort: port of Graphite server

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@thbar
thbar / nginx.conf
Last active August 29, 2015 14:17 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
module AlertConfirmer
class << self
def reject_confirm_from &block
handle_js_modal 'confirm', false, &block
end
def accept_confirm_from &block
handle_js_modal 'confirm', true, &block
end
# config/environment.rb
require File.expand_path('../application', __FILE__)
require File.expand_path('../rollbar', __FILE__)
begin
Rails.application.initialize!
rescue Exception => e
Rollbar.error(e)
raise
@thbar
thbar / docx2pdf
Last active August 29, 2015 14:10 — forked from diogo-almeida/docx2pdf
# Path of LibreOffice installation
cd /Applications/LibreOffice.app/Contents/MacOS
# General command
./soffice --headless --convert-to <extention> <path+file>
# Automatically convert all .odt files to pdf
./soffice --headless --convert-to pdf ~/Downloads/*.odt
# To specify an output folder you can add the --outdir option