This file contains hidden or 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
.vimrc | |
" Map leader to comma | |
let maplocalleader="," | |
" Toggle this for vim-sexp to not go into insert mode after wrapping something | |
let g:sexp_insert_after_wrap = 0 | |
" Toggle this to disable automatically creating closing brackets and quotes | |
let g:sexp_enable_insert_mode_mappings = 1 | |
Vocab |
This file contains hidden or 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
A B C D E | |
A | |
B 16 | |
C 15 4 | |
D 8 7 8 | |
E 10 3 6 11 |
This file contains hidden or 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
Check out README.md to get started editing Clojure with Emacs. |
This file contains hidden or 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 keyword->pg-enum | |
"Convert a keyword value into an enum-compatible object." | |
[enum-type kw] | |
(doto (org.postgresql.util.PGobject.) | |
(.setType enum-type) | |
(.setValue (name kw)))) | |
(def ->status | |
"Convert a keyword status into a something_status enum object" | |
(partial keyword->pg-enum "something_status")) |
This file contains hidden or 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 'fastercsv' | |
task 'usda:import' => ['usda:import:food_items','usda:import:food_groups','usda:import:nutrients','usda:import:food_item_nutrients', 'usda:import:weights'] | |
namespace :usda do | |
namespace :import do | |
task :food_items => :environment do | |
puts "Importing Food Items..." | |
fname = File.join(RAILS_ROOT,"/db/usda_sr21/FOOD_DES.txt") |
This file contains hidden or 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 'fastercsv' | |
task 'usda:import' => ['usda:import:food_items','usda:import:food_groups','usda:import:nutrients','usda:import:food_item_nutrients', 'usda:import:weights'] | |
namespace :usda do | |
namespace :import do | |
task :food_items => :environment do | |
puts "Importing Food Items..." | |
fname = File.join(RAILS_ROOT,"/db/usda_sr21/FOOD_DES.txt") |
This file contains hidden or 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
{ | |
"lib/*.ex": { | |
"type": "module", | |
"alternate": "test/{}_test.exs" | |
}, | |
"test/*_test.exs": { | |
"type": "test", | |
"alternate": "lib/{}.ex" | |
}, |
This file contains hidden or 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
#!/usr/bin/env bash | |
pattern=$1 | |
PORTS="" | |
if [ -z "$pattern" ]; then | |
PORTS=$(lsof -iTCP -sTCP:LISTEN) | |
else | |
PORTS=$(lsof -iTCP -sTCP:LISTEN | grep "$pattern") | |
fi |
This file contains hidden or 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
(ns my-todo.core | |
(:require [io.pedestal.http :as http] | |
[io.pedestal.http.route :refer [router]] | |
[io.pedestal.http.route.definition :refer [defroutes]])) | |
(defn hello-world [context] | |
{:status 200 | |
:body "Hello, world!" | |
:headers {}}) |
NewerOlder