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
+++ New Roster (Warhammer 40,000 9th Edition) [106 PL, 9CP, 1,993pts] +++ | |
++ Battalion Detachment -3CP (T'au Empire) ++ | |
+ Configuration + | |
Battle Size: 3. Strike Force (101-200 Total PL / 1001-2000 Points) | |
Detachment Command Cost |
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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# dplummer's theme, mostly copied from agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://gist.github.com/1595572). | |
# |
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 Grav.Resolver do | |
def resolve(protocol_module, args, field) do | |
{:ok, %{meta: meta} = root} = apply(protocol_module, :where, [args]) | |
records_name = root |> Map.keys |> Enum.reject(& &1 in [:meta, :links, :linked]) |> hd | |
records = preload_associations(root[records_name], field |> derive_preloads) | |
{:ok, root |> Map.put(records_name, records) |> Map.merge(meta)} | |
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
Rebar3 report | |
version 3.3.2 | |
generated at 2017-01-30T17:00:54+00:00 | |
================= | |
Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any) | |
----------------- | |
Task: DEBUG=1 | |
Entered as: | |
DEBUG=1 mix deps.compile cuttlefish | |
----------------- |
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 Client do | |
def connect(false, :undefined) do | |
IO.puts "Connecting to node" | |
connect Node.connect(:"main@10.3.17.68"), :undefined | |
end | |
def connect(true, :undefined) do | |
IO.puts "Finding main name" | |
connect true, find_main |
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 'rails' | |
require 'action_controller/railtie' | |
require 'rspec' | |
require 'rack/test' | |
class JsonTestApp < Rails::Application | |
config.root = File.dirname(__FILE__) | |
config.session_store :cookie_store, key: '****************************************' | |
config.secret_token = '****************************************' | |
config.secret_key_base = 'yup' |
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
RewriteEngine on | |
RewriteCond %{HTTP_HOST} !^www.new-domain.com$ [NC] | |
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [L,R] |
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
def compare_hashes(hash_a, hash_b, parent_keys = []) | |
keys_in_both = hash_a.keys & hash_b.keys | |
parent_name = parent_keys.map{|k| "['#{k}']"}.join | |
keys_in_both.each do |key| | |
if hash_a[key] != hash_b[key] | |
if hash_a[key].is_a?(Hash) && hash_b[key].is_a?(Hash) | |
compare_hashes(hash_a[key], hash_b[key], parent_keys + [key]) | |
else |
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
1.8.7 :001 > Foo = Struct.new(:id) do | |
1.8.7 :002 > BAR = 5 | |
1.8.7 :003?> end | |
=> Foo | |
1.8.7 :004 > BAR | |
=> 5 | |
1.8.7 :005 > Foo::BAR | |
(irb):5: warning: toplevel constant BAR referenced by Foo::BAR | |
=> 5 |
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
CREATE TRIGGER ai_order_statuses AFTER INSERT ON orders | |
FOR EACH ROW UPDATE order_status_counts | |
SET total = total + 1 | |
WHERE status = NEW.status | |
AND order_type = NEW.type | |
AND (NEW.on_hold != 1 OR NEW.on_hold IS NULL) | |
CREATE TRIGGER ad_order_statuses AFTER DELETE ON orders |
NewerOlder