Skip to content

Instantly share code, notes, and snippets.

Setting up Grbl on the Eleksmaker A3 Pro

ls /dev | grep usb
cu.usbserial-1410
tty.usbserial-1410

python stream.py square.ngc /dev/tty.usbserial-1410

class Verse
def initialize(count)
@count = count
end
def to_s
<<~EOS
#{@count} bottles of beer on the wall, #{@count} bottles of beer.
Take one down and pass it around, #{@count - 1} #{pluralize(@count - 1, 'bottle')} of beer on the wall.
EOS
import Ember from 'ember';
import EmberObject, { computed } from '@ember/object';
import { task, timeout } from 'ember-concurrency';
let CurrentUser = EmberObject.extend({
user: computed('userData', function() {
return this.get('userData');
}),
@mattsroufe
mattsroufe / gist:8028857
Last active December 31, 2015 18:39
Rescue ActiveRecord::RecordNotFound in Rails controller
class CommentsController < ApplicationController
rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found
def index
@user = User.find(params[:user_id]) if params[:user_id]
@comments = @user ? @user.comments : Comment.scoped
end
private