Add Sortable function, based on https://github.com/RubaXa/Sortable
A Pen by Florian LAMACHE on CodePen.
Add Sortable function, based on https://github.com/RubaXa/Sortable
A Pen by Florian LAMACHE on CodePen.
egrep -lRZ "\.jpg|\.png|\.gif" . \ | |
| xargs -0 -l sed -i -e 's/\.jpg\|\.gif\|\.png/.bmp/g' | |
#egrep: find matching lines using extended regular expressions | |
# -l: only list matching filenames | |
# -R: search recursively through all given directories | |
# -Z: use \0 as record separator | |
# "\.jpg|\.png|\.gif": match one of the strings ".jpg", ".gif" or ".png" | |
# .: start the search in the current directory | |
#xargs: execute a command with the stdin as argument |
# encoding: UTF-8 | |
module ApplicationHelper | |
# Utilitaire pour faire un lien dans un li qui applique des classe "current" | |
# automatiquement. | |
# | |
# Arguments : | |
# - nom : nom du lien | |
# - url : chemin vers la page |
#!/bin/bash | |
# Script and configuration to test analyser | |
# | |
# Check arguments | |
hostname=$1 | |
indexname=$2 | |
if [ -z "$hostname" ] || [ -z "$indexname" ] | |
then |
#! /usr/bin/env python | |
# | |
# Mixpanel, Inc. -- http://mixpanel.com/ | |
# | |
# Python API client library to consume mixpanel.com analytics data. | |
# | |
# Modified by Chris Mueller at Thumbtack for A/B tests | |
import hashlib | |
import urllib |
# An example of elasticsearch & Tire setup for ActiveRecord associations. | |
# | |
# A `Book has_many :chapters` scenario, with mapping and JSON serialization | |
# for indexing associated models. | |
# | |
# Demonstrates three important caveats as of now: | |
# | |
# 1. You you have to use `touch: true` in the `belongs_to` declaration, | |
# to automatically notify the parent model about the update. | |
# |
after "deploy:symlink", "deploy:restart_workers" | |
after "deploy:restart_workers", "deploy:restart_scheduler" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') |
load 'config/deploy' | |
desc "FTP Sync" | |
namespace :deploy do | |
desc "Sync and compile to remote by default" | |
task :default do | |
#assets.sprite | |
#assets.compile | |
remote.default |
Last updated: 12/31/2013
/etc/default/locale
as sudo.LC_ALL="en_US.UTF-8"
at the end of the file, save and quit.sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales
/* | |
Setup: | |
npm install ws | |
Usage: | |
Create an API key in Rancher and start up with: | |
node socket.js address.of.rancher:8080 access_key secret_key project_id | |
*/ | |
var WebSocket = require('ws'); |