Skip to content

Instantly share code, notes, and snippets.


Christian Trosclair xn

View GitHub Profile
xn / config.js
Created August 11, 2017 19:08
express app to substitute middleware for ember-cli-code-coverage for use with ember-electron app
View config.js
'use strict';
* @typedef {Object} Configuration
* @property {String} coverageEnvVar - name of environment variable for coverage
* @property {String} coverageFolder - directory in which to write coverage to
* @property {Array<String>} excludes - list of glob paths to exclude
* @property {Array<String>} reporters - list of reporters
xn / lazy_invocation.rb
Last active September 20, 2019 16:22
View lazy_invocation.rb
require 'set'
def figure_it_out(procs, **params)
params_provided = params.keys.to_set
procs = procs.each_with_object({}) {|proc, lookup| lookup[proc.parameters.transpose[1].to_set] = proc}
rescue NoMethodError
raise "Unknown set of params, slacker"
xn / Findable.rb
Last active February 3, 2016 22:10 — forked from lypborges/Findable.rb
Create a concern to use when using uuid as default primary key
View Findable.rb
module Findable
extend ActiveSupport::Concern
# When you use uuid some methods stop to work as expected. Using this concern in your models will do the job.
# Override methods on module FinderMethods that use id as default order when no order is defined
# It's a working in progress
# referencer:
module ClassMethods
xn /
Created December 21, 2015 19:57
alias nombom='echo "(╯°□°)╯︵ ┻━┻ " && npm cache clear && bower cache clean && rm -rf node_modules bower_components && npm install && bower install'
xn /
Created June 7, 2015 21:20
npm, bower, Why hast thou forsaken me?!?!
alias nombom='echo "(╯°□°)╯︵ ┻━┻ " && npm cache clear && bower cache clean && rm -rf node_modules bower_components && npm install && bower install'
View .gitconfig
helper = osxkeychain
editor = sublime -n -w
excludesfile = ~/.gitignore
whitespace = trailing-space,space-before-tab
quotepath = false
a = add
aa = add --all
xn / string.rb
Created July 1, 2014 20:27
Format String
View string.rb
person = {name: "Bob", age: "23"}
"name: %{name}, age: %{age}" % person
View gist:9920948
### Keybase proof
I hereby claim:
* I am xn on github.
* I am garbhoch ( on keybase.
* I have a public key whose fingerprint is EB80 940E 4C61 D7BB 933F D98C 5B16 C2DA F588 12F1
To claim this, I am signing this object:
View wiktenauer_donation_button.html
<form action="" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="KR6D24L958NRJ">
<input type="image" src="" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="" width="1" height="1">
xn / helpers.rb
Last active December 26, 2015 02:19
View helpers.rb
def render_stack(blockitem, size)
size = nil if size < 2
html = ""
link = localized.include?(blockitem) ? "" : "something"
html << "<a href=\"#{link}\" class=\"stack-link\">" # Not done, still need to change that for things
html << "<div class=\"recipe-icon\" style=\"background: url(#{url('images/wiki/#{blockitem}.png')});\" title=\"{$name}\">#{size}</div>"
html << "</a>"