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:
// https://gist.github.com/Yimiprod/7ee176597fef230d1451#gistcomment-2324809 | |
const transform = _.transform.convert({ | |
cap: false, | |
}); | |
const iteratee = baseObj => (result, value, key) => { | |
if (!_.isEqual(value, baseObj[key])) { | |
const valIsObj = _.isObject(value) && _.isObject(baseObj[key]); | |
result[key] = valIsObj === true ? differenceObject(value, baseObj[key]) : value; |
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS | |
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing). | |
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here: | |
* Heroku Hostname SSL | |
* GoDaddy Standard SSL Certificate | |
* Zerigo DNS |
brew uninstall imagemagick; brew install imagemagick --build-from-source; brew install libpng; brew link libpng |
~$ free -m | |
total used free shared buffers cached | |
Mem: 497 441 56 0 1 156 | |
-/+ buffers/cache: 282 214 | |
Swap: 255 131 124 | |
~$ ps -eo pmem,pcpu,rss,vsize,args --sort -pmem | less | |
%MEM %CPU RSS VSZ COMMAND | |
9.2 0.0 47056 112108 Rack: /srv/www/oclube.co |
#Primeiro eu jogo as gems do servidor em um arquivo .txt qualquer | |
gem list > my_gems.txt | |
#Esse é o script que vai instalar as gems | |
bulk_gems.rb | |
#! /usr/local/bin/ruby | |
STDIN.readlines.each do |l| | |
m = l.match /^(\S+) \((.*)\)/ | |
unless m.nil? |
# Put this file on config/initializer | |
# This will create an empty whitelist of attributes available for mass assignment for | |
# all models in your app. As such, your models will need to explicitly whitelist | |
# accessible parameters by using an attr_accessible declaration. This technique is best | |
# applied at the start of a new project. However, for an existing project with a thorough | |
# set of functional tests, it should be straightforward and relatively quick to insert this | |
# initializer, run your tests, and expose each attribute (via attr_accessible) as dictated | |
# by your failing tests. |
spawn-fcgi -a 127.0.0.1 -p 53217 -P /var/run/fastcgi-php.pid -- /usr/bin/php-cgi |
server_name .px2.com.br ; | |
#rewrite ^(.*)\.px2\.com\.br$ http://www.$1.com.br/ permanent; | |
if ($host ~* "^(.*)\.px2\.com\.br$"){ | |
set $subd $1; | |
rewrite ^(.*)$ http://$subd.pixelquadrado.com.br$1 permanent; | |
break; | |
} | |
if ($host = 'px2.com.br' ) { | |
rewrite ^/(.*)$ http://www.pixelquadrado.com.br/$1 permanent; | |
} |
all_exceptions = [] | |
ObjectSpace.each_object(Class) do |k| | |
all_exceptions << k if k.ancestors.include?(Exception) | |
end |