View propuesta.txt
// ahora | |
diccionarios = [channel_][territory_]language | |
templates = [channel_][territory_]language | |
configuraciones = [channel_]territory[_language] | |
// propuesta | |
The locale naming convention is: | |
language[_territory][.codeset][@modifier] | |
where a two-letter language code is from ISO 639, a two-letter territory code is | |
from ISO 3166, codeset is the name of the codeset that is being used in the |
View app.coffee
express = require 'express' | |
skipper = require 'skipper' | |
nodemailer = require 'nodemailer' | |
app = express() | |
verifyToken = (req, res, next) -> | |
token = req.body.token || req.query.token || req.headers['x-access-token'] | |
if token is process.env.TOKEN | |
next() | |
else |
View jruby+jdbc.rb
#!/usr/bin/env ruby | |
# coding: UTF-8 | |
require "./db2jcc4.jar" | |
require "./db2jcc_license_cu.jar" | |
query = <<-eos | |
select 'hello' as foo, 'world' as bar | |
from sysibm.sysdummy1 | |
eos |
View export-todos.rb
#!/usr/bin/env ruby | |
# coding: UTF-8 | |
require "logger" | |
require "pp" | |
require "yaml" | |
require "active_support/inflector" | |
logger = Logger.new $stderr | |
logger.level = Logger.const_get ENV.fetch "LOG_LEVEL", "INFO" |
View setup-continuous-deployment-ubuntu-12.10-x86_64.sh
DEPLOYER='deployer' | |
DEPLOYER_HOME="/home/$DEPLOYER" | |
PROJECT_NAME='node-js-sample' | |
PROJECT_REPO='https://github.com/heroku/node-js-sample.git' | |
# Provisining an ubuntu server | |
apt-get -y update | |
apt-get -y upgrade | |
apt-get -y install software-properties-common | |
add-apt-repository ppa:chris-lea/node.js |
View mental-mapping-code-smell.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Mental mapping code smell</title> | |
<style> | |
.language-flag { | |
float: left; | |
} | |
</style> |
View git-svn-relocate.sh
#!/bin/sh | |
# Must be called with two command-line args. | |
# Example: git-svn-relocate.sh http://old.server https://new.server | |
if [ $# -ne 2 ] | |
then | |
echo "Please invoke this script with two command-line arguments (old and new SVN URLs)." | |
exit $E_NO_ARGS | |
fi | |
View draw_bounding_box.cpp
#include "opencv2/highgui/highgui.hpp" | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <stdio.h> | |
#include <stdlib.h> | |
using namespace cv; | |
using namespace std; |
View gist:5764369
var step = 0; | |
async.waterfall([ | |
function (next){ | |
step = 1; | |
getJson('/country', function(data) { next(null, data); }); | |
}, | |
function (country, next){ | |
step = 2; | |
getJson('/weather', function(data) { next(null, country, data); }); |
View EJSRenderer.java
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
import org.apache.commons.lang.StringEscapeUtils; | |
import org.codehaus.jackson.map.ObjectMapper; | |
import java.io.ByteArrayOutputStream; |