Skip to content

Instantly share code, notes, and snippets.

Matt Briggs mbriggs

Block or report user

Report or block mbriggs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mbriggs
mbriggs / fixture.rb
Created Dec 12, 2018
Take 2 on handler fixtures
View fixture.rb
require_relative "../../automated_init"
context "Handle Commands" do
context "Added" do
context "Writes Added event" do
id = Controls::Account.id
account = Controls::Account::New.example
add = Controls::Commands::Add.example
time = Controls::Time::Processed.example
View event_written.rb
module Fixtures
class EventWritten
include TestBench::Fixture
attr_accessor :stream_name
attr_accessor :values
attr_accessor :command
attr_accessor :expected_version
attr_accessor :command_attributes
@mbriggs
mbriggs / install-graphite
Created Apr 3, 2014
install graphite on mavericks
View install-graphite
#!/usr/bin/env bash
# download and install xquartz https://xquartz.macosforge.org
# so deps
brew install cairo memcached
View redis.ex
defmodule Autobot.Redis do
import Exredis
def start_link do
Agent.start_link(fn ->
{:ok, client} = Exredis.start_link
client
end, name: __MODULE__)
end
@mbriggs
mbriggs / anonymous-gist.rb
Created Jan 17, 2016
my rails helper for webpack dev server, and compiled into public
View anonymous-gist.rb
def include_js(file)
@_js_includes ||= {}
@_js_includes[file] ||= begin
manifest_path = Rails.root.join('public', 'assets', 'manifest.json')
if File.exist?(manifest_path)
manifest = JSON.parse(File.read(manifest_path))
path = "/assets/#{manifest[file]}"
else
path = "http://127.0.0.1:8080/#{file}"
@mbriggs
mbriggs / anonymous-gist.js
Created Jan 17, 2016
production webpack config
View anonymous-gist.js
var webpack = require('webpack');
var path = require('path');
var ManifestPlugin = require('webpack-manifest-plugin')
function root(fragment){
return path.join(__dirname, "client", fragment);
}
module.exports = {
devtool: 'source-map',
View date-picker.js
function bindRange(scope, el, attrs){
var getFrom = $parse(attrs.pickFrom);
var setFrom = getFrom.assign;
var getTo = $parse(attrs.pickTo);
var setTo = getTo.assign;
var time = hasTime(attrs);
function updateField(){
var from = getFrom(scope);
var to = getTo(scope);
View gist:6969128

Thoughts on Angular

Overall, very impressed by how far the have come in the last year and a half or so. They have addressed probably the biggest issue I had with it last time I looked (how clunky it was to create even simple directives), the community is MUCH larger then it was, which has mitigated the second biggest issue (insufficient documentation)

The things I don't like thing is kind of big, but thats because its a combination of "dont like" with "don't understand" and "doing completely wrong", and at this point I don't really know enough about it to tell the difference :)

Things I Like

  • The view reaching into the JS means there is a class of wiring up / coordination code that doesn't need to exist.
View gist:6307107

I like OSX and I like Windows, have been a professional dev on both platforms. I totally understand where the post is coming from, but as a life long mac user, this is my perspective :)

I think the two big, major things the author missed are 1) OSX "power users" tend to be UNIX nerds, so doing things from the terminal is easy natural for them, and even if GUIs did exist they would probably go unused. While PowerShell is great, it is almost more of a scripting environment. UNIX is in my bones :) 2) When you buy a mac, expect to drop another 100-200$ on software to make it awesome (it is still reasonably easy to survive as a 1-2 man dev shop writing mac software as shareware, so there is a LOT of amazing shareware out there). By contrast, on windows, there is less software of that level of quality out there, but most of it is free. Good or bad, it is what it is, and has been that way for as long as I have had a mac (system 7 days)

  1. use http://www.alfredapp.com/ one of the best launchers out there for any O
View gist:6143061
(ns scrape-kuvva.core
(:require [scrape-kuvva.kuvva :as kuvva])
(:require [scrape-kuvva.files :as files]))
(def timeout 2000)
(defn sync
"Download any wallpaper that is
a) downloadable
b) not already downloaded"
You can’t perform that action at this time.