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
version: "3.8" | |
services: | |
phoenix: | |
build: . | |
volumes: | |
- ./src:/app | |
ports: | |
- "4000:4000" | |
depends_on: | |
- postgres |
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
2017-01-24 20:36:51: Welcome to the Hammerspoon Console! | |
You can run any Lua code in here. | |
2017-01-24 20:36:52: -- Lazy extension loading enabled | |
2017-01-24 20:36:52: -- Loading ~/.hammerspoon/init.lua | |
2017-01-24 20:36:52: -- Loading extension: appfinder | |
2017-01-24 20:36:52: -- Loading extension: uielement | |
2017-01-24 20:36:52: -- Some applications have alternate names which can also be checked if you enable Spotlight support with `hs.application.enableSpotlightForNameSearches(true)`. | |
2017-01-24 20:36:52: -- Loading extension: window | |
2017-01-24 20:36:52: -- Loading extension: hotkey |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
<head> | |
<!-- 2017-01-01 Sun 16:42 --> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>Setup zsh with Prezto on macos</title> | |
<meta name="generator" content="Org mode" /> |
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
class LabelsController < ApplicationController | |
respond_to :html, :js, :json | |
before_filter :authenticate_user! | |
before_filter :get_menu_item_or_redirect, only: [:show] | |
def index | |
@menu = Menu.get(params[:menu_id].to_i) | |
@menu_items = dispensary.active_menu_items.sort_by{|e| [e.category.name.to_s, e.name.to_s.downcase]} | |
respond_with @menu | |
end |
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
finiteBounds = (bounds) -> | |
ne = bounds.northeast | |
sw = bounds.southwest | |
return (isFinite(ne.lat) && isFinite(ne.lng) && isFinite(sw.lat) && isFinite(sw.lng)) | |
getBoundsZoomLevel = (bounds, size) -> | |
latRad = (lat) -> | |
sin = Math.sin(lat * Math.PI / 180) | |
radX2 = Math.log((1 + sin) / (1 - sin)) / 2 | |
Math.max(Math.min(radX2, Math.PI), -Math.PI) / 2 |
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
def create | |
begin | |
@todo_list = TodoList.find(params[:todo_list_id]) | |
@todo_item = @todo_list.todo_items.new(todo_item_params) | |
if @todo_item.save | |
flash[:success] = "Added todo list item." | |
redirect_to todo_list_todo_items_path | |
else | |
flash[:error] = "There was a problem adding that todo list item." | |
render action: :new |
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
def get(bucket, key) do | |
Agent.get(bucket, &HashDict.get(&1, key)) | |
end |
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
var obj = { foo: "bar", wut: "what" }; | |
var arr = [1,2,3,4,5]; | |
obj[Symbol.iterator] = function() { | |
let keys = Object.keys(this); | |
let nextIndex = 0; | |
return { | |
next() { | |
return nextIndex < keys.length ? | |
{ value: keys[nextIndex++], done: false } : |
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
var obj = { foo: "bar", wut: "what" }; | |
var arr = [1,2,3,4,5]; | |
obj[Symbol.iterator] = function() { | |
let keys = Object.keys(this); | |
let nextIndex = 0; | |
return { | |
next() { | |
return nextIndex < keys.length ? | |
{ value: keys[nextIndex++], done: false } : |
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
import foo from "./foo.js"; | |
foo(1); |
NewerOlder