I hereby claim:
- I am mderazon on github.
- I am mderazon (https://keybase.io/mderazon) on keybase.
- I have a public key whose fingerprint is A80C EB00 A6B8 EC21 47A3 E5B9 75D2 C988 4BF7 DC31
To claim this, I am signing this object:
#!/bin/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
I hereby claim:
To claim this, I am signing this object:
{ | |
"requireCurlyBraces": [ | |
"if", | |
"else", | |
"for", | |
"while", | |
"do", | |
"try", | |
"catch" | |
], |
var traverse = require('traverse'); | |
// filter json obj by language | |
var filter_language = function(language, obj) { | |
var result = traverse(obj).map(function(item) { | |
if (this.key === language) { | |
this.parent.update(item); | |
} | |
}); | |
return result; |
/* | |
* script to export data in all sheets in the current spreadsheet as individual csv files | |
* files will be named according to the name of the sheet | |
* author: Michael Derazon | |
*/ | |
function onOpen() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}]; | |
ss.addMenu("csv", csvMenuEntries); |
OIFS=$IFS; | |
IFS=","; | |
# fill in your details here | |
dbname=DBNAME | |
user=USERNAME | |
pass=PASSWORD | |
host=HOSTNAME:PORT | |
# first get all collections in the database |
<html> | |
<head> | |
<title>node, express and i18n</title> | |
</head> | |
<body> | |
<h1><%= __('Hello i18n')%></h1> | |
</body> | |
</html> |
var express = require('express'); | |
var i18n = require('./i18n'); | |
var app = express(); | |
app.set('views', __dirname + '/views'); | |
app.use(i18n); | |
app.get('/', function(req, res) { | |
console.log(res.__('Hello i18n')); |
var i18n = require('i18n'); | |
i18n.configure({ | |
// setup some locales - other locales default to en silently | |
locales:['en', 'iw'], | |
// where to store json files - defaults to './locales' relative to modules directory | |
directory: __dirname + '/locales', | |
defaultLocale: 'en', |
<html> | |
<head> | |
<title>node, express and i18n</title> | |
</head> | |
<body> | |
<h1>Hello i18n</h1> | |
</body> | |
</html> |