Skip to content

Instantly share code, notes, and snippets.

View MrHallows's full-sized avatar
🎯
Still waiting for my fellow Americans to wake the fuck up before it's too late.

MrHallows MrHallows

🎯
Still waiting for my fellow Americans to wake the fuck up before it's too late.
View GitHub Profile
var w = 500,
var h = 300,
var svg = d3.select("svg")
.attr("width", w)
.attr("height", h)
.style("background-color", "#fefefe")
.style("display", "block");
var circle = svg.selectAll("circle")
.data([19,30,18,20,22,29]);
@romyilano
romyilano / rottentomatoes.json
Created July 7, 2015 00:14
rottentomatoes.json
{
"movies": [
{
"id": "771324839",
"title": "Jurassic World",
"year": 2015,
"mpaa_rating": "PG-13",
"runtime": 123,
"critics_consensus": "",
"release_dates": {
@luca020400
luca020400 / f
Created September 10, 2015 09:49
usage: fastboot oem sp_test [options]
options:
add <name> <size> add a new SP block
remove <name> remove a SP block
help show usage
usage: fastboot oem regex [options]
match <pattern> <string> match <patten> against <string>
help show usage
usage: fastboot oem wptest [options]
enable enable writeprotect
@paulirish
paulirish / what-forces-layout.md
Last active May 11, 2025 01:28
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@josefnpat
josefnpat / readme.md
Last active February 1, 2025 07:08
Going from Lua 5.2 to PICO-8's Lua

This information applies to the PICO-8 0.1.6 release.

This document is here to help folks with a proficiency in Lua understand the limitations and discrepencies between Lua and PICO-8's Lua.

You can always view the manual or yellowafterlife's extended 0.1.1 manual.

General

  • anything written in uppercase the PICO-8 editor or .p8 is made lowercase by the editor. → editing the .p8 file directly can work
  • print(function() end) outputs the string function instead of the string function: 0x0000000.
@maximilian-lindsey
maximilian-lindsey / express_in_electron.md
Last active November 3, 2024 21:30
How to run Express inside an Electron app

How to run Express inside an Electron app

You can run your Express app very easily inside your Electron app.

All you need to do is to:

  • place all the files of your Express app inside a new app folder in your_electron_app\resources\app
  • reconfigure the app.js file
  • refactor some relative pathes in your Express app
@wmakeev
wmakeev / diff-patch.js
Created August 12, 2016 08:50
JSON diff #json #diff
'use strict'
const jsondiffpatch = require('jsondiffpatch')
const stringify = require('json-stable-stringify')
const objectHashFunctions = [
obj => obj.uuid,
obj => obj.id,
obj => stringify(obj)
]
@Arinerron
Arinerron / permissions.txt
Last active May 6, 2025 18:23
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO
@ivan
ivan / gist:3c846dbcef0f3897c1935449d1af6111
Created October 26, 2016 23:40
List of OEM commands you can run on a Moto G LTE XT1045
# ./platform-tools/fastboot oem help
(bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
...
(bootloader) config...
(bootloader) partition...
(bootloader) ramdump...
(bootloader) blankflash
(bootloader) fb_mode_set
@elog08
elog08 / asyncRecurse.js
Created January 31, 2017 02:12
A recursive function to process nested JSON objects asynchronously
/*
* Modifies the values of a JSON object recursively and asynchronously.
*/
// Wrapper for async.Map that persists the keys of the object
// https://github.com/caolan/async/issues/374#issuecomment-59191322
async.objectMap = async.objectMap || function(obj, func, cb) {
var i, arr = [],
keys = Object.keys(obj);
for (i = 0; i < keys.length; i += 1) {