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
@tmpvar
tmpvar / .gitignore
Last active December 19, 2015 14:28
vegasjs - super lightning talk
node_modules
@74togo
74togo / FloydSteinberg.html
Last active November 6, 2020 02:51
An example of the Floyd–Steinberg applied to images in Javascript.
<html>
<head>
<title>Dithering Test</title>
</head>
<body>
<canvas></canvas>
<script>
var canvas = document.getElementsByTagName("canvas")[0];
#!/usr/bin/env node
if (process.argv.length < 4) {
return console.log('usage: togif 25 path/to/files/*.jpg path/to/output.gif');
}
// node expands *.jpg
var images = process.argv.slice(2);
var delay = images.shift();
@chengyin
chengyin / linkedout.js
Last active July 11, 2021 15:23
Unsubscribe all LinkedIn email in "one click". For an easier to use version, you can check out the bookmarklet: http://chengyin.github.io/linkedin-unsubscribed/
// 1. Go to page https://www.linkedin.com/settings/email-frequency
// 2. You may need to login
// 3. Open JS console
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers))
// 4. Copy the following code in and execute
// 5. No more emails
//
// Bookmarklet version:
// http://chengyin.github.io/linkedin-unsubscribed/
@thcipriani
thcipriani / baller_motd.md
Last active February 12, 2023 12:28
Using img2ponysay to create baller /etc/motd message

Update: I made this a proper blog post

Creating Baller/Useful MOTD Messages

Zangief MOTD

Prerequisites

  • linux box
@tmpvar
tmpvar / leapmotion-servofinger.js
Last active December 31, 2015 22:09
leap motion to servofinger experiment
var five = require("johnny-five");
var ws = new (require('ws'))('ws://localhost:6437');
ws.on('open', console.log.bind(console, 'connected'));
ws.on('error', console.log.bind(console, 'ERROR:'));
(new five.Board()).on("ready", function() {
var servo = new five.Servo(11);
ws.on('message', function(data) {
self.bold = function(state) {
self.printer.write(esc);
self.printer.write(chr(69));
// 0 || 'off' = off
// 1 || 'on' = on
self.printer.write(chr(state));
}
@mikaelbr
mikaelbr / destructuring.js
Last active April 25, 2024 13:21
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@nicknisi
nicknisi / open-source-beginner.md
Last active June 7, 2022 12:50
A collection of JavaScript projects with issues labeled beginner-friendly
@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));