Skip to content

Instantly share code, notes, and snippets.

View jeremytregunna's full-sized avatar

Jeremy Tregunna jeremytregunna

View GitHub Profile
defmodule Junction.Receiver do
require Logger
use GenServer
alias Junction.Types.Log
def start_link(opts \\ []) do
GenServer.start_link(__MODULE__, :ok, opts)
end
Pod::Spec.new do |s|
s.ios.deployment_target = '8.1'
s.name = 'Calibre'
s.version = '2.0.0'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'Reactive programming library inspired by Redux'
s.homepage = 'https://github.com/Greenshire/Calibre'
s.authors = { 'Jeremy Tregunna' => 'jeremy@tregunna.ca' }
s.source = { :git => 'https://github.com/Greenshire/Calibre.git', :tag => '2.0.0' }
s.requires_arc = true
protocol StateType {}
func withTypes<SpecificState>(_ state genericState: StateType?, function: (_ state: SpecificState?) -> SpecificState) -> StateType {
guard let genericState = genericState else {
return function(nil) as! StateType
}
guard let specificState = genericState as? SpecificState else {
return genericState
}
//
// SplashViewController.swift
// Transit
//
// Created by Jeremy Tregunna on 2016-07-25.
// Copyright © 2016 Greenshire, Inc. All rights reserved.
//
import UIKit
import Standard
<?xml version=“1.0” encoding=“UTF-8”?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=“1.0”>
<dict>
<key>Device UDIDs</key>
<array>
<dict>
<key>deviceNumber</key>
<string>65e769169e06e1055f9e204a3f4398ce30121e5c</string>
<key>deviceName</key>
#!/bin/sh
. git-simple-common.sh
if [ X"$1" = X"-h" ]; then
echo "Usage: git switch [branch]"
echo " Performs an optional stash of current changes before switching to [branch] where it"
echo " checks for any stashes that can be popped, and applies those."
exit 0
fi
module alu #(parameter WIDTH = 32) (
input clk,
input reset,
input [WIDTH - 1:0] a,
input [WIDTH - 1:0] b,
input [3:0] op,
output c_flag,
output z_flag,
output s_flag,
output [WIDTH - 1:0] value);
module regfile #(parameter WIDTH = 32, COUNT = 16, ADDR_WIDTH = 4) (
output reg [WIDTH - 1:0] data_out,
input clk,
input reset,
input write,
input [ADDR_WIDTH - 1:0] addr,
input [WIDTH - 1:0] data_in);
reg [WIDTH - 1:0] registers[COUNT - 1:0];
guard var attachments = value else { return nil }
let jsonAttachments = attachments.reduce([String:[String:String]]()) { acc, attachment in
if attachment.id != nil && attachment.name != nil && attachment.file != nil {
acc[attachment.id!] = ["name": attachment.name!, "file": attachment.file!]
}
return acc
}
Verifying that +jer is my blockchain ID. https://onename.com/jer