Skip to content

Instantly share code, notes, and snippets.

View supernullset's full-sized avatar

Sean Williamson supernullset

View GitHub Profile
defmodule ErrorCodes.Repo do
use Ecto.Repo, otp_app: :error_codes
end
defmodule ErrorCodes.ErrorCode do
use Ecto.Schema
schema "errors" do
end
end
* TODO: Implement Dose Sum
- This will involve keeping track of calculations across a whole
profile. Which means I need some sort of global state which is
held in the profile instance.
```
22830 !****************
22840 Dose_sum:Dos=Dos+EXP(FNConc(Rho(N),Typ(N)))
22850 Con=Con+EXP(-Rho(N))
** (FunctionClauseError) no function clause matching in IO.chardata_to_string/1
(elixir) lib/io.ex:346: IO.chardata_to_string(nil)
(elixir) lib/path.ex:467: Path.join/2
(elixir) lib/path.ex:449: Path.join/1
lib/client.ex:44: Mailgun.Client.send_without_attachments/2
@supernullset
supernullset / index.html
Last active February 17, 2016 00:08
Randomly generated battleship built at a fast pace
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<title>battleship</title>
</head>
<body>
<div id="board">
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="sugar-1.3.5-full.min.js"></script>
</head>
<body>
<div id="container" style="height: 900px; min-width: 310px; max-width: 1400px; margin: 0 auto"></div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
require "rails"
require "action_controller/railtie"
class Dummy < Rails::Application
config.root = File.dirname(__FILE__)
config.session_store :cookie_store, key: '****************************************'
config.secret_token = '****************************************'
# Log to spec/dummy/test.log
require "benchmark"
class KWBM
attr_reader :foo, :baz
def initialize(foo: "bar", baz: "biz")
@foo = foo
@baz = baz
end
def call
(global-set-key [f2] 'toggle-selective-display-at-depth)
(defun toggle-selective-display-at-depth (column)
(interactive "P")
(set-selective-display
(if selective-display nil (or column 3))))
(global-set-key [f2] 'toggle-selective-display-at-depth)
(defun toggle-selective-display-at-depth (column)
(interactive "P")
(set-selective-display
(if selective-display nil (or column 3))))
(defun assign-group-from-hash (hash keys)
"creates a series of instance variable assignments in the style @key = hash.fetch(:key)"
(interactive "sHash Name: \nsKeys(separated by a space): ")
(let ((hash-keys (split-string keys)))
(mapc (lambda (key) (insert (format "@%s = %s.fetch(:%s)\n" key hash key))) hash-keys)
)
)