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
# include this in your ~/.zshrc or ~/.bashrc
pconsole () {
if [[ $1 == production ]];
then RAILS_ENV=production bundle exec pry -r ./config/environment.rb -r rails/console/app -r rails/console/helpers;
elif [[ $1 == test ]];
then RAILS_ENV=test pry -r ./config/environment.rb -r rails/console/app -r rails/console/helpers;
else bundle exec pry -r ./config/environment.rb -r rails/console/app -r rails/console/helpers;
fi }
@rondale-sc
rondale-sc / eslint-diff-set-of-commits.md
Last active January 26, 2023 15:19
Command to run eslint against a set of commits

img

@rondale-sc
rondale-sc / components.my-component\.js
Created February 4, 2021 19:40
target-caching-without-bug
import Component from '@glimmer/component';
export default class extends Component {
}
@rondale-sc
rondale-sc / gist-1.rb
Created March 22, 2012 05:05
ruby-hough-hack
# Authors: Robert Jackson, Jonathan Jackson
# the formatting of this file has been altered in
# order to fit on this website. Check out
# https://gist.github.com/1233581 if you care
require 'chunky_png' #or 'oily_png'
class Hough
def initialize(image_path, options={})
@image = ChunkyPNG::Image.from_file(image_path)
@image_path = image_path

Syntastic setup:

Install:

vim-syntastic/syntastic

Add the following to ~/.eslintrc

{
function! SelectaCommand(choice_command, vim_command)
try
silent! exec a:vim_command . " " . system(a:choice_command . " | selecta")
catch /Vim:Interrupt/
endtry
redraw!
endfunction
let g:selecta_command = 'find * ' .
\ '-type f ' .
@rondale-sc
rondale-sc / inline-svg-helper.js
Created October 29, 2018 18:37
Glimmer Inline SVG
// src/utilities/inline-svg/helper.js
// @ts-ignore:
import { svgs } from '../../../utils/svgs';
function dottify(path) {
return (path || '').replace(/^\//g, '').replace(/\//g, '.');
}
export default function inlineSvg([path]) {
import Ember from 'ember';
import { inject as service } from '@ember/service';
import { getOwner } from '@ember/application';
export default Ember.Controller.extend({
routerService: service('router'),
appName: 'Ember Twiddle',
actions: {
actionOne() {
this.get('routerService').transitionTo('foo.bar.my-route', 1, { queryParams: { foo: 1 }});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});