Ranger mac setup:
- brew install ranger
- ranger --copy-config=all
- vim ~/.config/ranger/rc.conf
- preview_image false --> true
Other Tools:
- brew install w3m
- brew install lynx
#!/bin/sh - | |
#title :backup_neo4j_to_s3.sh | |
#description :This script is creating a NEO4J Backup through neo4j-backup tool, | |
# compress the backup folder via LZMA2 algorithm compression, and upload it to AWS S3. | |
#author :Quentin Rousseau <contact@quent.in> | |
#date :2014-07-28 | |
#version :1.1 | |
#usage :sh backup_neo4j_to_s3.sh ip port destination | eg. sh backup_neo4j_to_s3.sh 127.0.0.1 6362 /mnt/datadisk/backup | |
#dependencies :apt-get update && apt-get install p7zip-full && apt-get install awscli. | |
#============================================================================== |
#!/bin/bash | |
# So you know whoami, but whereami? | |
# Relies on this handy hack <https://github.com/lindes/get-location> | |
latlong=$(/usr/local/bin/get-location 2> /dev/null \ | |
| sed -e 's/.*<\(.*\)>.*/\1/') | |
address=$(curl -Ss "http://maps.googleapis.com/maps/api/geocode/json?latlng=$latlong&sensor=false" \ | |
| grep formatted_address \ | |
| head -n 1 \ | |
| sed -e 's/[ \t]*"formatted_address" : "\(.*\)",/\1/') |
# http://www.evanmiller.org/bayesian-ab-testing.html implemented in ruby | |
# requires the distribution gem from https://github.com/clbustos/distribution (gem 'distribution', require: false) | |
def probability_b_beats_a(completed_a, total_a, completed_b, total_b) | |
require 'distribution/math_extension' | |
total = 0.0 | |
alpha_a = completed_a + 1 | |
beta_a = total_a - completed_a + 1 | |
alpha_b = completed_b + 1 |
Ranger mac setup:
Other Tools:
#Deploy and rollback on Heroku in staging and production | |
class RakeHerokuDeployer | |
def initialize app_env | |
@app = ENV["#{app_env.to_s.upcase}_APP"] | |
end | |
def run_migrations | |
push; turn_app_off; migrate; restart; turn_app_on; tag; | |
end |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
Thanks to this article by Christoph Berg
Directories and files
~/
#Heroku, Ruby on Rails and PhantomJS
In this post, I’m going to show you how to modify an existing Ruby on Rails app running on Heroku’s Cedar stack to use PhantomJS for screen scraping. If you’ve never heard of PhantomJS, it’s a command-line WebKit-based browser (that supports JavaScript, cookies, etc.).
Let’s get started. This is a high-level overview of the required steps:
//Set Variables | |
$button-white: #ffffff; | |
$button-green: #44ca00; | |
$button-green-dark: #369a12; | |
$button-blue: #a6d1f9; | |
$button-blue-dark: #14283e; | |
$button-gray: #eeeeee; | |
$button-red: #9e0b0f; | |
//Create Array |