Skip to content

Instantly share code, notes, and snippets.

View jede's full-sized avatar
👾
🤖

Johannes Edelstam jede

👾
🤖
View GitHub Profile
@dwilliamson
dwilliamson / MarchingCubes.js
Last active May 7, 2024 09:46
Marching Cubes Lookup Tables
//
// Lookup Tables for Marching Cubes
//
// These tables differ from the original paper (Marching Cubes: A High Resolution 3D Surface Construction Algorithm)
//
// The co-ordinate system has the more convenient properties:
//
// i = cube index [0, 7]
// x = (i & 1) >> 0
// y = (i & 2) >> 1
@LukeL99
LukeL99 / compress-web-video.sh
Created December 29, 2015 21:22
Compress video output for HTML5 background video
#!/bin/bash
# Make sure ffmpeg is installed with the following flags
# brew install ffmpeg --with-libvpx
#
# Take source video, convert to raw grayscale (-pix_fmt gray),
# remove audio track (-an), darken it by 50% (-vf "lutyuv=y=val*.5"),
# and output to an avi container for maximum compatibility.
# Pipe all that to stdout
# (ffmpeg -i - \) take input rawvideo track, and...

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter