This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mail' | |
Mail.defaults do | |
delivery_method :smtp, { | |
:address => '<smtp server>', | |
:port => 587, | |
:user_name => '<username>', | |
:password => '<password>', | |
:authentication => 'plain', | |
:enable_starttls_auto => true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doc = { | |
name: "Samuel Flores", | |
exams: [ | |
{name: "Eletro-cardiograma", date: "2012-08-10"}, | |
{name: "Hemacias", date: "2012-08-09"}, | |
{name: "Tomografia", date: "2012-08-10"}, | |
{name: "Hemacias", date: "2012-06-10"}, | |
{name: "Ressonancia Magnetica", date: "2012-05-10"}, | |
{name: "Whatever", date: "2012-04-10"}, | |
{name: "Whatever", date: "2012-03-10"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn render [template data partials] | |
(render-resource | |
(str "templates/" template ".mustache") | |
data | |
(reduce #(assoc %1 %2 (slurp (io/resource (str "templates/" %2 ".mustache")))) {} partials))) | |
(render "index" {:name "John Smith"} '[header footer]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'monger.core) | |
(require 'monger.collection) | |
(connect!) | |
(set-db! (get-db "database-name")) | |
(insert "people" {:name "Samuel Flores" :age 28}) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Preferences" | |
open | |
activate | |
end tell | |
# can be defined as uncicode data (U+D83D U+DE04) or the actual emoji character | |
set emojis to {¬ | |
{":smile:", «data utxtD83DDE04» as Unicode text}, ¬ | |
{":grim:", "😬"} ¬ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clojure definition for ctags | |
# put on ~/.ctags | |
--langdef=clojure | |
--langmap=clojure:.clj | |
--regex-clojure=/^\(def[ \t]+(\^\{.*\})?[ \t]*([^ \t]+).*/\2/d,definition/ | |
--regex-clojure=/^\(defn[ \t]+(\^\{.*\})?[ \t]*([^ \t]+).*/\2/d,function definition/ | |
--regex-clojure=/^\(defn\-[ \t]+(\^\{.*\})?[ \t]*([^ \t]+).*/\2/d,private function definition/ | |
--regex-clojure=/^\(defmacro[ \t]+(\^\{.*\})?[ \t]*([^ \t]+).*/\2/d,macro definition/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="d3.v2.min.js"></script> | |
<style type="text/css"> | |
body { height: 100%; width: 100%; } | |
.link { stroke: #ccc; } | |
.nodetext { pointer-events: none; font: 10px sans-serif; } | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo = case value | |
when nil | |
NullObject.new | |
else | |
value | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let bg=system("~/bin/background_color") | |
set background="".bg | |
colorscheme solarized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
### BEGIN INIT INFO | |
# Provides: postgresql | |
# Required-Start: $local_fs $remote_fs $network $time | |
# Required-Stop: $local_fs $remote_fs $network $time | |
# Should-Start: $syslog | |
# Should-Stop: $syslog | |
# Default-Start: 2 3 4 5 |