Skip to content

Instantly share code, notes, and snippets.

View rondale-sc's full-sized avatar

Jonathan rondale-sc

  • Providence, Rhode Island
View GitHub Profile
@rwjblue
rwjblue / steps.md
Last active April 12, 2020 18:07
Remote Pairing (through SSH tunnel) Setup

Start with a machine that is directly accessible to both parties via SSH (linode, EC2, prgmr.com, etc), and that you can add users to. DO NOT USE root!!!!

Usage

##From the hosts local machine:

ssh -R1337:localhost:22 host@<shared server's ip address/hostname>
@joachimhs
joachimhs / gist:3529609
Created August 30, 2012 14:27
Ember.js rerender on window resize issue
init: function() {
var view = this;
var resizeHandler = function() {
view.rerender();
};
this.set('resizeHandler', resizeHandler);
$(window).bind('resize', this.get('resizeHandler'));
},
@nusco
nusco / style.md
Last active April 8, 2017 23:13
Joseph William's Style Suggestions from Lesson 3

Diagnosis

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
pixelhandler / transforms.js
Last active October 3, 2016 06:54
Raw object and array tranforms for Ember Data
/*
DS.attr('object')
*/
App.ObjectTransform = DS.Transform.extend({
deserialize: function(value) {
if (!$.isPlainObject(value)) {
return {};
} else {
return value;
}
@mikepack
mikepack / gist:7900448
Last active December 30, 2015 23:28
Removing Ember.run from all (Jasmine) tests

When testing Ember code, without putting expectations in a Ember.run callback, you'll get this error:

Failure/Error: Assertion Failed: You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchronous side-effects in an Ember.run

The error recommends wrapping expectations in Ember.run:

describe 'something', -&gt;
@assafgelber
assafgelber / Rakefile
Last active December 19, 2015 15:38
Rakefile for building haml layouts, includes and indexes for jekyll for use in github pages.
# Rake tasks to parse haml layouts, includes and index files for jekyll
# Assumes that the haml files are in (_layouts|_includes|_posts)/_haml
namespace :haml do
require 'haml'
def convert file, destination
base_name = File.basename(file, '.haml') + '.html'
html = File.open(file, 'r') { |f| Haml::Engine.new(f.read).render }
File.open(File.join(destination, base_name), 'w') { |f| f.write html }
$ rvm mount -r https://rvm.io/binaries/ubuntu/12.04/i386/ruby-1.9.3-p392.tar.bz2 --verify-downloads 1
https://rvm.io/binaries/ubuntu/12.04/i386/ruby-1.9.3-p392.tar.bz2 - #configure
ruby-1.9.3-p392 - #download
######################################################################## 100.0%
ruby-1.9.3-p392 - #validate archive
ruby-1.9.3-p392 - #extract
ruby-1.9.3-p392 - #validate binary
ruby-1.9.3-p392 - #setup
Saving wrappers to '/home/rdm/.rvm/wrappers/ruby-1.9.3-p392'........
ruby-1.9.3-p392 - #importing default gemsets, this may take time.......................
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 () {};
window.console.info = window.console.info || 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.
@jerel
jerel / clear.sh
Created April 13, 2015 19:13
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
```
[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
```