Skip to content

Instantly share code, notes, and snippets.

View jonatassalgado's full-sized avatar
🌴
On vacation

Jonatas Eduardo (Jon) jonatassalgado

🌴
On vacation
  • Brazil - Porto Alegre
View GitHub Profile
#!/bin/bash
sudo apt-get install git
sudo cp john /usr/bin/
sudo chmod 777 /usr/bin/john
/**
* @file
* Simulating user actions with CasperJS. This script explores the ability to
* use Casper for navigation just like a user would: clicking the page and
* entering text to submit a form. This script accompanies a blog post from
* Four Kitchens:
*
* @see http://fourword.fourkitchens.com/article/simulate-user-actions-casperjs
*/

How to install PhantomJS on Ubuntu

Version: 1.9.7

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
@jonatassalgado
jonatassalgado / db.rake
Created May 6, 2019 20:14 — forked from joelvh/db.rake
Rails rake tasks for dump & restore of PostgreSQL databases
# Original source: https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90
# Merged with: https://gist.github.com/kofronpi/37130f5ed670465b1fe2d170f754f8c6
namespace :db do
desc 'Dumps the database to backups'
task dump: :environment do
dump_fmt = ensure_format(ENV['format'])
dump_sfx = suffix_for_format(dump_fmt)
backup_dir = backup_directory(Rails.env, create: true)
full_path = nil
cmd = nil