Skip to content

Instantly share code, notes, and snippets.

View phcostabh's full-sized avatar
🧑‍💻
Coding

Philippe Santana Costa phcostabh

🧑‍💻
Coding
View GitHub Profile
@phcostabh
phcostabh / nginx_rails_3_1
Created September 9, 2012 14:18 — forked from shapeshed/nginx_rails_3_1
Nginx Config for Rails 3.1 with Unicorn and Asset Pipeline
upstream app {
server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name www.app.com;
rewrite ^/(.*) http://app.com/$1 permanent;
}
@phcostabh
phcostabh / capybara cheat sheet
Created October 15, 2012 23:14 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@phcostabh
phcostabh / zsh.md
Created October 18, 2012 00:53 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu

Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh

and then you change your shell to zsh

chsh -s `which zsh`

and then restart

@phcostabh
phcostabh / fb-album.css
Created November 23, 2012 14:04 — forked from stevedev/fb-album.css
Simple jQuery Facebook Album Script
#photo-container {
padding: 15px;
}
#photo-container a {
overflow: hidden;
display: block;
float: left;
border: 1px solid #cdcac6;
padding: 0;
@phcostabh
phcostabh / setup.sh
Last active December 15, 2015 09:09 — forked from mrsweaters/setup.sh
#!/usr/bin/env bash
# login as root and run this script via bash & curl:
sudo apt-get update
sudo apt-get install -y build-essential bison openssl libreadline5 libreadline5-dev curl \
git-core zlib1g zlib1g-dev libopenssl-ruby libcurl4-openssl-dev libssl-dev \
libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libmysqlclient-dev \
mysql-client mysql-server
set :application, "App Name" # Your app name
set :repository, "git@github.com:xxxxx/xxx.git" # Your git repository
set :document_root, "/home/user/www/awesome_app"
set :deploy_via, :remote_cache
# SSH Settings
set :user, "user_ssh"
set :password, "password_ssh"
set :use_sudo, false
@phcostabh
phcostabh / php-fpm
Last active December 17, 2015 19:09 — forked from kain-jy/gist:4138784
PHP-FPM as service with PHPBrew
#! /bin/sh
#
# run as current user
#
# before, you should edit php-fpm.conf
# and comment out [www] user and group.
PHP_BASE=$HOME/.phpbrew/php/$PHPBREW_PHP
PHP_FPM_BIN=$PHP_BASE/sbin/php-fpm

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

src = "#{ARGV[1]}.*.php"
tests = src.gsub("src/", "tests/Unit/")
watch(src) do |match|
match[0].gsub!("src/", "")
run_test %{tests/Unit/#{match[0]}}
end
watch(tests) do |match|
run_test match[0]
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'