Skip to content

Instantly share code, notes, and snippets.

View maxmechanic's full-sized avatar
💭
🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈

~max mechanic~ maxmechanic

💭
🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈
View GitHub Profile
@divanvisagie
divanvisagie / LED_Server.js
Last active May 1, 2020 08:03
Web server controlled LED on Arduino using johnny-five and the dev version of NARF( https://github.com/divanvisagie/NARF/tree/Dev ) , Five minute hack. LED is placed on pin 13.Once you get LED_Server running, the client at index.html can control the LED on your Arduino , you will have to change the GET urls in index.html if you are using it on a…
var five = require( 'johnny-five' ),
board,
narf = require( 'narf' );
board = new five.Board();
/*
Executes a command and fires event when done that
will return the command output
*/

Node.js Resources

What is node.js?

Node.js is just JavaScript running on the server side. That's it. That's all there is to it.

Express

  • Express Docs, if you want to get started and already know JavaScript this is the place to be
@staltz
staltz / introrx.md
Last active November 19, 2024 18:00
The introduction to Reactive Programming you've been missing
@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@bobbygrace
bobbygrace / trello-css-guide.md
Last active November 3, 2024 14:56
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@kosamari
kosamari / _ServiceWorker_for_github_pages.md
Last active April 1, 2024 05:44
ServiceWorker for github pages.

ServiceWorker for github pages

This is a ServiceWorker template to turn small github pages into offline ready app.

Why ?

Whenever I make small tools & toys, I create github repo and make a demo page using github pages (like this one).
Often these "apps" are just an index.html file with all the nessesary CSS and JavaScript in it (or maybe 2-3 html/css/js files). I wanted to cache these files so that I can access my tools offline as well.

Notes

Make sure your github pages have HTTPS enforced, you can check Settings > GitHub Pages > Enforce HTTPS of your repository.

@Rich-Harris
Rich-Harris / service-workers.md
Last active November 5, 2024 06:39
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.