Skip to content

Instantly share code, notes, and snippets.

View devsigner's full-sized avatar

Cedric Darricau devsigner

  • France
View GitHub Profile
(function($){
//Finding min and max values in array from http://snippets.dzone.com/posts/show/769
Array.prototype.min = function(){ return Math.min.apply({},this) };
Array.prototype.max = function(){ return Math.max.apply({},this) };
$.fn.masonry = function() {
this.each(function() {
var wall = $(this);
@devsigner
devsigner / .a_README.markdown
Created June 14, 2014 22:10 — forked from jondkinney/README.md
jondkinney's console vim setup

Console VIM and Tmux setup compatible with Mac OS X and Linux.

Disclaimer: This file is called .a_README.markdown so that it'll appear first in the gist view (sorry for the horrible name)

Installation

Because this script prompts for user input, you have to execute it in a bit of an odd way. From a new command prompt simply copy and paste the following command and press return:

Console VIM and Tmux setup compatible with Mac OS X and Linux.

Disclaimer: This file is called .a_README.markdown so that it'll appear first in the gist view (sorry for the horrible name)

Installation

Because this script prompts for user input, you have to execute it in a bit of an odd way. From a new command prompt simply copy and paste the following command and press return:

@devsigner
devsigner / gist:3965107
Created October 27, 2012 15:40 — forked from nhocki/gist:1164315
Reverse proxy for passenger in apache server
# In the apps root directory run
# http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/
# passenger start -a localhost -p 3000 -e production -d
<VirtualHost *:80>
ServerName ranking.timehub.net
DocumentRoot /the/path/to/the/app/public
PassengerEnabled off
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
@devsigner
devsigner / hack.sh
Created March 31, 2012 12:15 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@devsigner
devsigner / rbenv-install-system-wide.sh
Created March 28, 2012 09:52 — forked from v1nc3ntlaw/rbenv-install-system-wide.sh
rbenv install ruby 1.9.3-p125 on Debian 6 Squeeze
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
@devsigner
devsigner / ovhfact.rb
Created January 20, 2012 23:02 — forked from solisoft/ovhfact.rb
OVH Invoices
#!/usr/bin/ruby
# Require:
# - linux or Mac
# - ruby 1.8.7
# - Gem soap4r
# - curl
#
# Usage :
# ruby ovhfact.rb 2011
#
@devsigner
devsigner / index.js.erb
Created December 17, 2011 21:16 — forked from ryanb/index.js.erb
Infinite scrolling solution covered in revised episode #114: http://railscasts.com/episodes/114-endless-page-revised
$('#products').append('<%= j render(@products) %>');
<% if @products.next_page %>
$('.pagination').replaceWith('<%= j will_paginate(@products) %>');
<% else %>
$('.pagination').remove();
<% end %>