Skip to content

Instantly share code, notes, and snippets.

View vdaubry's full-sized avatar

vincent daubry vdaubry

View GitHub Profile
@vdaubry
vdaubry / gist:9750386
Last active August 29, 2015 13:57
deploy.rb
# config valid only for Capistrano 3.1
lock '3.1.0'
set :application, 'my-app'
set :repo_url, 'git@github.com:my-app.git'
# Default deploy_to directory is /var/www/my_app
set :deploy_to, '/srv/www/my-app'
set :rvm_ruby_string, :local # use the same ruby as used locally for deployment
@vdaubry
vdaubry / bashrc
Created March 28, 2014 08:44
.basrc
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
@vdaubry
vdaubry / bash_profile
Created March 28, 2014 08:46
.bash_profile
export PATH=$PATH:~/bin
[[ -s "/Users/vincentdaubry/.rvm/scripts/rvm" ]] && source "/Users/vincentdaubry/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# MacPorts Installer addition on 2012-02-03_at_16:06:34: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
# MacPorts Installer addition on 2012-02-18_at_08:57:12: adding an appropriate PATH variable for use with MacPorts.
@vdaubry
vdaubry / gist:cdc465d6d5ef84576830
Last active August 29, 2015 14:05
Document correctly embedded
{
"_id":{
"$oid":"54033bf96d627008c6000000"
},
"websites":[
{
"_id":{
"$oid":"54033bf96d627008c6010000"
},
"created_at":"2014-08-31T15:15:05.278Z",
@vdaubry
vdaubry / gist:a9c217a467dd9ff9a7fb
Created August 31, 2014 15:21
Bug in embedded documents
{
"_id":{
"$oid":"54033bf96d627008c6000000"
},
"websites":[
{
"_id":{
"$oid":"54033bf96d627008c6010000"
},
"created_at":"2014-08-31T15:15:05.278Z",
@vdaubry
vdaubry / gist:eb98c7d982647bc14cba
Created November 21, 2014 15:38
Jekyll - title tag after
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
@vdaubry
vdaubry / gist:df233106010970ddb237
Created December 2, 2014 07:15
facebook-share-button
<div class="fb-share-button" data-href="{{site.url}}{{page.url}}" data-layout="button_count" style="position: relative; top: -8px; left: 33px;"></div>
@vdaubry
vdaubry / gist:eafabf211957cbe87563
Created February 7, 2015 17:27
proxy drops custom header with https
$ curl -I -x 127.0.0.1:5566 http://www.google.fr
HTTP/1.1 200 OK
Date: Sat, 07 Feb 2015 16:28:17 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=5472383c9c9d26f1:FF=0:TM=1423326497:LM=1423326497:S=yu2leDB676aEfg96; expires=Mon, 06-Feb-2017 16:28:17 GMT; path=/; domain=.google.fr
Set-Cookie: NID=67=iPjeDuufTg9UhlCrCuMmA93LSA8LWjBl_H3tliNTWZUsQS2Gtzw36xR2fFz_D9Nz0eWg8Fy_qtTy_cozXTuil7reP_6mwd0_WrH1j1RrSZZlDv3rEXyHOOXnZ1h07qax; expires=Sun, 09-Aug-2015 16:28:17 GMT; path=/; domain=.google.fr; HttpOnly
P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
Server: gws
@vdaubry
vdaubry / gist:2869d85b2e8affdc5a8c
Created February 7, 2015 17:28
proxy drops custom header with https
$ curl -I -x 127.0.0.1:5566 https://www.google.fr
HTTP/1.1 200 Connection established
Proxy-Agent: Privoxy/3.0.23
X-Servedby: 50001
HTTP/1.1 200 OK
Date: Sat, 07 Feb 2015 16:29:25 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
@vdaubry
vdaubry / gist:db113605c9f8af37a020
Created March 28, 2015 08:07
sample nginx conf
upstream puma {
server unix:///srv/www/githubawards/shared/tmp/sockets/puma.sock;
}
server {
listen 80 default_server deferred;
# server_name example.com;
root /srv/www/githubawards/current/public;
access_log /srv/www/githubawards/shared/log/nginx.access.log;