Skip to content

Instantly share code, notes, and snippets.

View JamesLefrere's full-sized avatar
💵
Ethereum

James Lefrère JamesLefrere

💵
Ethereum
  • Berlin, Germany
View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 31, 2025 21:28
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

# METEOR CORE:
Anywhere: Meteor.isClient
Anywhere: Meteor.isServer
Anywhere: Meteor.startup(func)
Anywhere: Meteor.absoluteUrl([path], [options])
Anywhere: Meteor.settings
Anywhere: Meteor.release
@wesbos
wesbos / gulpfile.js
Last active October 21, 2019 19:38
FAST Browserify + Reactify + Babelify
// Update: Hey Folks - I've got a full Gulpfile with everything else over at https://github.com/wesbos/React-For-Beginners-Starter-Files
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var babelify = require('babelify');
var watchify = require('watchify');
var notify = require('gulp-notify');
@veered
veered / tracker.js
Last active May 28, 2019 22:12
Some bonus features for Tracker
// Only trigger enclosing computation if the return value of
// f is not EJSON.equals to the previuous return value
Tracker.guard = function(f) {
if (Meteor.isServer || !Tracker.currentComputation) {
return f();
}
let dep = new Tracker.Dependency(),
curView = Blaze.currentView,
tplFunc = Template._currentTemplateInstanceFunc;
@Rich-Harris
Rich-Harris / service-workers.md
Last active July 27, 2025 19:02
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.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@chmanie
chmanie / libp2p-discovery.adoc
Last active May 6, 2019 10:11
libp2p discovery options

libp2p discovery options

Module name node support browser support go support works w/o rendezvous server true P2P[1] works w/o bootstrap

libp2p-mdns

X

O

X

X

X

X

libp2p-railing[2]

X

X

X[3]

X

X

O

libp2p-kad-dht

X[4]

X[4]

X

X

X

O

libp2p-webrtc-star

X

X

O

O

X

O[5]

libp2p-websocket-star

X

X

X

O

O

O[5]


1. no tunnel required
2. this is essentially just bootstrapping, not discovery per se
3. via bootstrap config
4. disabled by default, see: libp2p/js-libp2p-kad-dht#86 and ipfs/js-ipfs#1982
5. you have to bootstrap the star itself
@miguelmota
miguelmota / README.md
Last active February 28, 2023 02:10
Deploy custom Optimism rollup instructions

Instructions

Unofficial guide on deploying a custom Optimism rollup on Kovan

⚠️ Notice: Guide updated April 2021. Check out the Optimism discord for additional help and support.

Clone optimism contracts:

git clone [email protected]:ethereum-optimism/optimism.git