def show(conn, %{"id" => id}) do
post = Repo.get(Post, id)
render(conn, "show.html", post: post)
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
<template> | |
<div> | |
<p class="menu-label">Latest Callsigns</p> | |
<input class="input" type="text" placeholder="Filter stations..." v-model="stationFilter"> | |
<div class="station-list"> | |
<button | |
v-for="callsign in filteredStations" | |
:key="callsign" | |
@click="focusMarker(callsign)" | |
class="button is-small" |
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
defmodule MyApp.Ecto.Atom do | |
@behaviour Ecto.Type | |
# | |
# BEHAVIOUR | |
# | |
def type, do: :string | |
def cast(value) when is_binary(value) or is_atom(value) do |
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
# Source: https://github.com/gregseth/suncalc-php/blob/master/suncalc.php | |
require 'date' | |
RAD = Math::PI / 180.0 | |
DEG = 180.0 / Math::PI | |
E = RAD * 23.4397 # obliquity of the Earth | |
J2000 = 2451545 | |
def to_days(datetime) | |
datetime.ajd.to_f - J2000 |
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
# | |
# SET OPTIONS HERE | |
# | |
# True means that no files will actually be moved | |
@dry_run = false | |
# False keeps the same controller and view file names, whereas | |
# true renames them to controller.ex and view.ex, respectively. | |
@shorten_names = false |
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
Site | UGC | |
---|---|---|
W1/Calais | MEC029 | |
W1/Eastport | MEC029 | |
W2/Summit | NYC095 | |
W2/Blueberry | NYC027 | |
W4/Atlanta | GAC171 | |
W7/Tacoma | WAC033 | |
W7/Portland | WAC071 | |
W2/Quaker | NYC027 | |
W2/Windham | NYC039 |
I hereby claim:
- I am schrockwell on github.
- I am schrockwell (https://keybase.io/schrockwell) on keybase.
- I have a public key whose fingerprint is 7B69 522C FD44 A985 3538 8978 F914 E3FB CA95 E3AC
To claim this, I am signing this object:
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
# Compiling Codec 2 and FreeDV on Windows | |
# Rockwell Schrock, WW1X | |
# December 7, 2012 | |
# | |
# Based off the README.Win32 file in the FreeDV SVN repository. | |
# Tested on Windows 7 32-bit. | |
# | |
# More info: http://freedv.org/ | |
# | |
# Install MinGW with options: C Compiler, C++ Compiler, MSYS |
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
#! /usr/bin/env ruby | |
# | |
# Linode dynamic DNS updater | |
# Version 0.0.3 | |
# August 21, 2012 | |
# | |
# By Rockwell Schrock | |
# [email protected] | |
# https://gist.github.com/3415112 |
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
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# Yahtzee CLI | |
# Version 0.0.2 | |
# | |
# By Rockwell Schrock | |
# [email protected] | |
# https://gist.github.com/gists/3359964 | |
# |
NewerOlder