Skip to content

Instantly share code, notes, and snippets.

View mason-stewart's full-sized avatar
🎃
無敵

Mason Stewart mason-stewart

🎃
無敵
  • Bookshop.org
  • NeW eNgLaNd
View GitHub Profile
@mason-stewart
mason-stewart / Default (OSX).sublime-keymap
Last active January 9, 2019 02:06
Better user key bindings for SublimeREPL.
[
// Remapping of *some* SublimeREPL shortcuts
{ "keys": ["ctrl+super+s"], "command": "repl_transfer_current", "args": {"scope": "selection"}},
{ "keys": ["ctrl+shift+,", "s"], "command": "repl_transfer_current", "args": {"scope": "selection", "action":"view_write"}},
{ "keys": ["ctrl+shift+super+f"], "command": "repl_transfer_current", "args": {"scope": "file"}},
{ "keys": ["shift+ctrl+,", "f"], "command": "repl_transfer_current", "args": {"scope": "file", "action":"view_write"}},
{ "keys": ["ctrl+super+l"], "command": "repl_transfer_current", "args": {"scope": "lines"}},
{ "keys": ["shift+ctrl+,", "l"], "command": "repl_transfer_current", "args": {"scope": "lines", "action":"view_write"}},
{ "keys": ["ctrl+super+b"], "command": "repl_transfer_current", "args": {"scope": "block"}},
{ "keys": ["shift+ctrl+,", "b"], "command": "repl_transfer_current", "args": {"scope": "block", "action":"view_write"}}
@mason-stewart
mason-stewart / analyzer.r
Created July 9, 2018 20:19
This generates the following error:
# sentio model v3
# use:
# Sentio gives a clients best employees the test
# Those employes are compared to previous sentio test takers
# to determine which characteristics are most similar to
# best employees.
# output:
# 1) output scores (0-10) for total and for each input variable
# for the "best" employees and the employees which need to be scored
# 2) parameters from regression
@mason-stewart
mason-stewart / rollout.sh
Created August 29, 2014 17:31
Roll out.
#!/bin/bash
open -a Google\ Chrome "https://www.youtube.com/watch?v=mjqn6j2VM2U"
sleep 16
say "roll out"
sleep 0.8
say "roll out"
sleep 0.8
say "roll out"
sleep 0.8
@mason-stewart
mason-stewart / fancy-symbolset.scss
Created October 31, 2012 20:36
FANCY versions of Symbolset glyphs!
// This is a peek behind the curtain at @zaarly's epic-fantasy-heavy-metal-themed internal styleguide, better known as Hammer.
//
// With this, you can add the .fancy class to a symbolset span inside of a heading tag to add a nice circular background.
// Some adjustments to the positioning of a particular glyph may be necessary.
// Each :before is set to postion: relative, so fine-tuning a .fancy glyph is simple, and won't affect the position of the circle.
//
// Example markup (in HAML):
// %h1
// %span.ss-check.fancy
// Cool Guy Settings™ saved!
@mason-stewart
mason-stewart / Gruntfile.js
Created January 28, 2014 02:08
Run `npm install --save grunt-cdn`, and then add these bits to Gruntfile.js
grunt.initConfig({
// ...
cdn: {
options: {
/** @required - root URL of your CDN (may contains sub-paths as shown below) */
cdn: 'https://YOUR-USERNAME.github.io/YOUR-REPO/',
/** @optional - if provided both absolute and relative paths will be converted */
flatten: true
/** @optional - if provided will be added to the default supporting types */
// supportedTypes: { 'phtml': 'html' }
@mason-stewart
mason-stewart / asdf.js
Created January 7, 2014 21:29
This will prep your urls to work from a subfolder when deployed to GH pages, but still work locally. You'll also need to run `npm install --save grunt-cdn`.
// add this to your configuration
cdn: {
options: {
cdn: '//YOUR-USERNAME.com/YOUR-REPO-NAME/',
flatten: true
},
dist: {
src: ['./dist/*.html', './dist/styles/{,*/}*{,*/}*.css']
}
}
@mason-stewart
mason-stewart / app.jsx
Last active January 2, 2016 08:09
Using React 0.8.0. This throws an JSX compilation error on line 23 of app.jsx for some reason?
/** @jsx React.DOM */
'use strict';
var data = {
message: 'Dumb Dumb',
text: "green",
color: "green"
}
var HelloWorld = React.createClass({
getInitialState: function() {
(ns test2
"Let's start with something short."
(:require [dommy.core :as dom]
[inky.sketch :as sketch])
(:use-macros [dommy.macros :only (node)]))
(sketch/page-style!
[:div.box {:position "absolute"
:top "48%"
:bottom "48%"
(ns test
"Let's start with something short."
(:require [dommy.core :as dom]
[inky.sketch :as sketch])
(:use-macros [dommy.macros :only (node)]))
(sketch/page-style!
[:div.box {:position "absolute"
:top "48%"
:bottom "48%"
(ns first
"Let's start with something short."
(:require [dommy.core :as dom]
[inky.sketch :as sketch])
(:use-macros [dommy.macros :only (node)]))
(sketch/page-style!
[:div.box {:position "absolute"
:top "48%"
:bottom "48%"