Skip to content

Instantly share code, notes, and snippets.

View noopkat's full-sized avatar
🐤
building my own birdfeeder on here

Suz Hinton noopkat

🐤
building my own birdfeeder on here
View GitHub Profile
@HipsterBrown
HipsterBrown / teasel-update-firmware
Created January 2, 2016 20:28
Update Tessel Node module on the device
scp -i ~/.tessel/id_rsa node/tessel-export.js root@oogie_boogie.local:/usr/lib/node
@torgeir
torgeir / raspberry-pi-2-node-4.2.2-serialport-2.0.2.log
Last active November 7, 2015 17:53
Installing serialport@2.0.2 on node 4.2.2 on the Raspberry Pi 2 - Raspbian GNU/Linux 7 (wheezy)
pi@bekkpi2 ~ $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
..
pi@bekkpi2 ~ $ source ~/.nvm/nvm.sh
..
pi@bekkpi2 ~ $ nvm install 4.2.2
..
pi@bekkpi2 ~ $ cat /etc/*-release
@max-mapper
max-mapper / readme.md
Last active October 30, 2015 03:05
node.js release questions

As a maintainer of native node add-on modules I have some questions about when and why NODE_MODULE_VERSION changes:

(@rvagg has anwered these in the comments below)

@paulirish
paulirish / what-forces-layout.md
Last active April 24, 2024 12:47
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@eliotsykes
eliotsykes / current-route-query-params-ember-component.js
Last active November 13, 2019 13:06
How to get the current route, queryParams, etc. in an Ember component
// Examples
// Yes, "router.router" twice - this assumes that the router is being injected
// into the component. Otherwise lookup 'router:main'
// One of these will be of interest, figure out which one you want:
this.get('router.router.state');
this.get('router.router.state.params');
this.get('container').lookup('controller:application').currentPath;
@maryrosecook
maryrosecook / ...
Last active September 13, 2018 18:17
Reminders to myself to help me get better at programming. I don't always manage to do these things, but I try. Please feel free to add your own reminders to yourself in the comments below!
We couldn’t find that file to show.
@jedthehumanoid
jedthehumanoid / serialport-electron.md
Last active June 11, 2018 19:47
Build node serialport for electron

Building node-serialport for Electron on Windows

These instruction are for Windows, on my Linux installation(Fedora 21) everything works by just installing serialport with npm (I don't know why!).

These are the steps I did to build node serialport for electron (formerly atom-shell) for Windows. I am completely certain there is a better way to do it, but since I struggled with it for quite a while, here is a solution anyway.

You need some version of Visual studio installed, I have VS 2012 Express for Desktop.

@tmpvar
tmpvar / currency-to-number.js
Created April 15, 2015 01:56
turn a non-degenerate formatted monetary amount and convert it to a number
var input = [
'$10.000,00',
'$10,000.00',
'$10,000.00 ',
'$10,,,000.00 ',
'$10,0,0,0.00 ',
'$10,000',
'$10,000',
'$10000',
'10000',
@xero
xero / irc.md
Last active March 29, 2024 13:30
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@amk221
amk221 / document-events.js
Last active January 13, 2016 19:38
Ember.js: Easier document-level event handling
var app = Ember.Application.create();
app.DocumentEventsMixin = Ember.Mixin.create({
$doc: $(document),
documentCallbacks: {},
addDocumentEvents: function() {
this.eachDocumentEvent(function(name, callback) {
this.$doc.on(name, callback);
}.bind(this));