This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
/* | |
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 |
#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' |
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!
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps
psql postgres -c "create database circular_fkeys_left" | |
psql circular_fkeys_left <<EOS | |
create table foos(id integer primary key, bar_id integer); | |
create table bars(id integer primary key, foo_id integer); | |
insert into foos(id, bar_id) values(1, 5); | |
insert into bars(id, foo_id) values(5, 1); | |
alter table foos add constraint bar_fk foreign key(bar_id) references bars; | |
alter table bars add constraint foo_fk foreign key(foo_id) references foos; | |
EOS |
# View my Jekyll blog http://paulstamatiou.com and my jekyll migration post http://paulstamatiou.com/how-to-wordpress-to-jekyll/ | |
# | |
# | |
# based on the import script by icebreaker, which is based on mojombo's | |
# https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb | |
# https://gist.github.com/303570 | |
# edited to rewrite image URLs to use my CloudFront URL | |
require 'rubygems' | |
require 'sequel' |
## within current branch, squashes all commits that are ahead of master down into one | |
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case) | |
## commit any working changes on branch "mybranchname", then... | |
git checkout master | |
git checkout -b mybranchname_temp | |
git merge --squash mybranchname | |
git commit -am "Message describing all squashed commits" | |
git branch -m mybranchname mybranchname_unsquashed | |
git branch -m mybranchname |