Skip to content

Instantly share code, notes, and snippets.

@davidsulc
davidsulc / i18n.coffee
Created March 15, 2012 11:49 — forked from madrobby/i18n.coffee
Backbone i18n with CoffeeScript
# before this file is loaded, a locale should be set:
#
# In a browser environment, you can use:
# ```<script>__locale='en';</script>```
#
# In a server environment (specifically node.js):
# ```global.__locale = 'en';```
# normalize in-app locale string to "en" or "de-AT"
parts = @__locale.split('-')
@davidsulc
davidsulc / 1_WTF.md
Last active August 29, 2015 14:07 — forked from valpackett/1_WTF.md

Kindle dictionary template

Use it with KindleGen

kindlegen dic.opf

@davidsulc
davidsulc / sql_parser.exs
Created September 10, 2022 08:13 — forked from sasa1977/sql_parser.exs
Basic SQL parser developed at WebCamp Zagreb, 2019
defmodule SqlParser do
def run() do
input = "select col1 from (
select col2, col3 from (
select col4, col5, col6 from some_table
)
)
"
IO.puts("input: #{inspect(input)}\n")
IO.inspect(parse(input))