Skip to content

Instantly share code, notes, and snippets.

View sntran's full-sized avatar

Sơn Trần-Nguyễn sntran

View GitHub Profile
defmodule XmlNode do
require Record
Record.defrecord :xmlAttribute, Record.extract(:xmlAttribute, from_lib: "xmerl/include/xmerl.hrl")
Record.defrecord :xmlText, Record.extract(:xmlText, from_lib: "xmerl/include/xmerl.hrl")
def from_string(xml_string, options \\ [quiet: true]) do
{doc, []} =
xml_string
|> :binary.bin_to_list
|> :xmerl_scan.string(options)
@sntran
sntran / index.html
Created September 20, 2013 13:32 — forked from roman01la/index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="viewport"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/three.js/r58/three.min.js"></script>
<script src="//threejs.org/examples/js/controls/OrbitControls.js"></script>
@sntran
sntran / arrows.css
Last active December 17, 2015 19:48 — forked from danott/entities.css
Separated to reusable CSS classes, with support for IE.
/* Daniel Ott
* entities.css
* 31 January 2011
*
* Updated: 28 May 2013
* Son Tran
*
* Adding arrows to thinks makes them more clickable. Right?
* Use CSS's :after pseudo-selector to insert hexadecimal values
* of html entities into the document. Less markup. More awesome.
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/
@sntran
sntran / Conway's Game of Life in Erlang.md
Last active December 15, 2015 01:29 — forked from jszmajda/Readme.md
Conway's Game of Life in Erlang Conway's Game of Life in Erlang, in 2 hours, with 0 Erlang experience, in 22 lines of code.

sadsadasd

sadasd

<%= files["Flick.png"] %>

  • @sntran
  • @sdfippinger
/* Transparent Tabs */
.tabs {
list-style: none;
padding: 0;
overflow: hidden;
}
.tab {
display: block;
float: left;