As configured in my dotfiles.
start new:
tmux
start new with session name:
ssh -v -p 22 -nNT4 -R *:<public-port>:localhost:<local-port> <public-host-username>@<public-host> | |
ssh -v -nNT4 -R *:3000:localhost:3000 user@www.host.com |
SET @old = 'http://old'; # Vecchio dominio - da cui si trasferisce l'installazione | |
SET @new = 'http://new'; # Nuovo dominio - verso cui si trasferisce l'installazione | |
UPDATE wp_options SET option_value = replace(option_value, @old, @new) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, @old, @new); | |
UPDATE wp_posts SET post_content = replace(post_content, @old, @new); |
# Example code and benchmark harness for http://blog.gregspurrier.com/articles/arbitrary-reordering-of-ruby-arrays | |
require 'rubygems' | |
require 'rspec' | |
module Enumerable | |
def reorder_by1(order, &key_proc) | |
order.map do |x| | |
find {|obj| key_proc.call(obj) == x} | |
end |
include Tire::Model::Search | |
include Tire::Model::Callbacks | |
settings :analysis => { | |
:filter => { | |
:ngram_filter => { | |
:type => 'edgeNGram', | |
:min_gram => 1, | |
:max_gram => 10, | |
:side => 'front' |
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the unicorn web server | |
# Description: starts unicorn |
#!/sbin/runscript | |
# GitLab init script for Gentoo Linux | |
# see https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md | |
GITLAB_BASE=/home/gitlab/gitlab | |
GITLAB_USER=gitlab | |
depend() { | |
need net mysql redis | |
} |
gem 'devise' | |
gem 'omniauth' | |
gem 'omniauth-github' | |
gem "omniauth-twitter" | |
gem "omniauth-facebook" | |
gem "omniauth-google-oauth2" |
var gr = gr || {}; | |
gr.listingDetail = { | |
// (string) `id` | |
"id": "526c4ff4d9464da9f800ff7f", | |
// (string) `category` - "residential" | |
"category": "residential", | |
// (string) `grouping` - "entirely" | "rooms" |
As configured in my dotfiles.
start new:
tmux
start new with session name:
curl -X GET http://localhost:3100/v2/job_positions/1?include=author,company,hiring_team_members&fields[company]=name&fields[author]=name&fields[hiring_team_members]=name,permissions |