Skip to content

Instantly share code, notes, and snippets.

View maniart's full-sized avatar
📶

Mani Nilchiani maniart

📶
View GitHub Profile
@devongovett
devongovett / gist:2218587
Created March 27, 2012 18:11
get a blob from a canvas
function getBlob(canvas) {
var data = atob(canvas.toDataURL().replace('data:image/png;base64,', '')),
bytes = new Uint8Array(data.length);
for (var i = 0, len = data.length; i < len; i++) {
bytes[i] = data.charCodeAt(i) & 0xff;
}
var bb = new BlobBuilder();
bb.append(bytes.buffer);
@zenorocha
zenorocha / README.md
Last active April 6, 2024 16:59
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@brianloveswords
brianloveswords / eff-you-region-lock.md
Last active December 22, 2015 15:08
Defeating region lock

Prerequisites

  • Somewhat modern version of OpenSSH
  • Server you have SSH access to in the region you want to stream from.

Bummed about region lock? Start up your terminal and do this:

$ ssh -N -D 9999 yourserver.com
@jbranchaud
jbranchaud / TestableJavaScript.md
Last active July 15, 2021 12:36
Resources on writing testable JavaScript

Testable JavaScript Resources

Testing JavaScript isn't just a thing you can read about in children's fairy tales.

This is just a scratch pad of everything I find. As the really good resources start to float to the top, I'll transition them to a more permanent GitHub repo.

General

$(cd /tmp && curl -H "Host: brooklynjs.com" 23.235.39.133 > brooklynjs.html && $(command -v open > /dev/null && which open || which xdg-open) brooklynjs.html && sleep 3 && rm brooklynjs.html)
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 24, 2024 06:43
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

stream video is not avilable anymore

I've changed link to each video. I'll add links to slides as I find them :)

The Scary Stuff

Simon Swain - Cold War Simulation
Yan Zhu - Weird Tricks to Improve Web Security 10000000% Slides
Jed Schmidt - Inline Styles

UX & Performance

Michelle Bu - building component libraries

@fabien-d
fabien-d / Object.assign.js
Created September 22, 2015 16:27
Nested Object.assign calls formatting
let object = {
key: {
subkey: 'value',
status: 'STATUS'
}
};
// compact
Object.assign( {}, object, { key: Object.assign( {}, object.key, { status: 'PENDING' } ) } );
@nolanlawson
nolanlawson / parens-and-perf-counterpost.md
Last active August 14, 2023 20:08
"Parens and Performance" – counterpost

"Parens and Performance" – counterpost

Kyle Simpson (@getify) wrote a very thoughtful post decrying optimize-js, which is a tool I wrote that exploits known optimizations in JavaScript engines to make JS bundles parse faster (especially minified bundles, due to what could be reasonably described as a bug in Uglify).

Kyle lays out a good case, but I tend to disagree with nearly all his points. So here's my rebuttal.

@brigand
brigand / writing-open-source-component.md
Last active October 21, 2017 23:00
React.js: Writing open source components

Open source is an important part of the react ecosystem. Most of the time you'll use components written by others, but you may wish to create components other people can use. For this guide, you'll need to have node.js and git installed.

Setup

First you'll need to create a project directory, and open a terminal in that directory. React components are published as npm packages, so we need a package.json file. To create one, run npm init and follow the prompts.