Skip to content

Instantly share code, notes, and snippets.


Jonathan rondale-sc

  • Providence, Rhode Island
View GitHub Profile
alexlafroscia / jsconfig.json
Created Aug 20, 2018
Ember App jsconfig.json
View jsconfig.json
"compilerOptions": {
"target": "es6",
"experimentalDecorators": true,
"baseUrl": ".",
"paths": {
"origin-story-core-ui/*": ["./app/*"]
"exclude": [
View initializers.ie9-console-fix.js
export function initialize(/* container, application */) {
// IE9 doesn't define a console object until the development tools are opened.
// This causes hard-to-debug JavaScript errors for things like `console.log`.
window.console = window.console || {};
window.console.log = window.console.log || function () {}; = || function () {};
window.console.warn = window.console.warn || function () {};
window.console.error = window.console.error || function () {};
// We also ensure that if we call newer console functions it doesn't break
// older browsers.
ef4 / select.hbs
Last active Oct 7, 2021
Goodbye old Select View
View select.hbs
<select onchange={{action (mut vehicle) value="target.value"}}>
{{#each vehicles key="@item" as |vehicleChoice|}}
<option value={{vehicleChoice}} selected={{eq vehicle vehicleChoice}}>{{vehicleChoice}}</option>
jerel /
Created Apr 13, 2015
Bash script to clear watchman roots to solve Error: watch EMFILE
watchman watch-list | tr -d '[:space:]' | grep -Po '(?<="roots":\[).*?(?=\])' | grep -Po '(?<=").*?(?="?,)' | while read path; do watchman watch-del "$path"; done
View findNodesBy.js
/* globals module */
'using strict';
module.exports = function (options) {
if (arguments.length === 2) {
options = {
body: arguments[0],
match: arguments[1]
View gist:147e97688a0e1c7b4897
[miah@host ~]$ ps auxww|grep 'sshd: miah'
root 32416 0.0 0.1 82460 3952 ? Ss 16:35 0:00 sshd: miah [priv]
miah 32418 0.0 0.1 83136 2344 ? S 16:35 0:00 sshd: miah@pts/0
searls /
Created May 2, 2014
Creating a USB install disk of OS X Mavericks

Apple has changed how it distributes OS X Mavericks since its initial release in October 2013. This note was written on May 2, 2014. This affects the instructions you'll find online for how to make a bootable OS X installer.

It used to be that when you downloaded OS X from the App Store, the entire 5GB installer was placed in /Applications/Install OS X Now, there is a simple shortcut program placed in /Applications/OS X The app file is immediately removed in the event of an error or a successful post-install launch. When the download succeeds, the app file is launched which brings up the traditional install wizard, but this time mounted to /Volumes/Install OS X Mavericks.

I actually discovered this because if you already have a volume mounted of the same name (which I did, because I was trying to update my existing USB installer), the App Store download promptly fails right after finishing its download.

So if you have an empty disk you'd like to use as an installer that'

csfrancis /
Last active Apr 23, 2022
Dump an MRI call stack from gdb
# Updated for Ruby 2.3
string_t = None
def get_rstring(addr):
s = addr.cast(string_t.pointer())
if s['basic']['flags'] & (1 << 13):
return s['as']['heap']['ptr'].string()
return s['as']['ary'].string()
nusco /
Last active Apr 8, 2017
Joseph William's Style Suggestions from Lesson 3


Ignoring short introductory phrases ("In the meantime," "Although," etc.), underline the first seven or eight words in each sentence.

Look for three characteristics:

  1. Sentences that begin not with characters, but abstract nouns.
  2. Sentences that take more than six or seven words to get to a verb.
  3. Verbs that are less specific than the actions buried in the nouns around them.
pixelhandler / transforms.js
Last active Oct 3, 2016
Raw object and array tranforms for Ember Data
View transforms.js
App.ObjectTransform = DS.Transform.extend({
deserialize: function(value) {
if (!$.isPlainObject(value)) {
return {};
} else {
return value;