Skip to content

Instantly share code, notes, and snippets.

View spacegauch0's full-sized avatar

[object Object] spacegauch0

View GitHub Profile
@HarryPhillips
HarryPhillips / sizzy-no-scrollbars.js
Last active July 2, 2018 12:52
Userscript: Remove / Toggle scrollbars for Sizzy (https://github.com/kitze/sizzy)
// ==UserScript==
// @name Toggle Sizzy Scrollbars
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Removes scrollbars from Sizzy's iframes whilst providing a manual override button for each iframe too.
// @author Harry Phillips
// @match http://sizzy.co/*
// @grant none
// ==/UserScript==
@antirez
antirez / lmdb.tcl
Created April 28, 2017 15:40
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!
@mediafreakch
mediafreakch / sprint_organisation.md
Last active April 11, 2017 19:30
How to organise Engineering tasks

Sprint organisation

Sprint Working Principles

  • Focus on 1 goal (Business Outcome) per sprint
  • Only work on tasks that are (prioritized) on the Sprint Board
  • Work on tasks according to their priorities on the Board
  • Move Github issues to the Sprint Backlog and prioritize them with your Product Manager
  • The Engineering day can be used to work on tasks unrelated to the Topic Team's goal
@jaydenseric
jaydenseric / zeit-now-g-suite-setup.md
Created March 20, 2017 04:46
Zeit Now G Suite setup

Run each of the following lines, replacing yourdomain.com and codehere with your details:

now dns add yourdomain.com @ TXT google-site-verification=codehere
now dns add yourdomain.com @ MX ASPMX.L.GOOGLE.COM 1
now dns add yourdomain.com @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT3.ASPMX.L.GOOGLE.COM 10
now dns add yourdomain.com @ MX ALT4.ASPMX.L.GOOGLE.COM 10
{
// The standard ECS options, place in your own values:
"cluster": "",
"serviceName": "my-side-car-container",
"taskDefinition": "",
"role": "",
// desireCount should be greater than the number of instances that are in the ECS cluster.
"desiredCount": 1000,

Listpack specification

Version 1.0, 1 Feb 2017: Intial specification.

Version 1.1, 2 Feb 2017: Integer encoding simplified. Appendix A added.

Version 1.2, 3 Feb 2017: Better specify the meaning of the num-elements
                         field with value of 65535. The two 12 bits

positive/negative integers encodings were

@mediafreakch
mediafreakch / billing.json
Created January 18, 2017 14:29
Sample response from the Invoicing Microservice
{
"overview": {
"billing_status": "active",
"credit_limit": 1000,
"to_pay_amount": 90,
"not_invoiced_fees_debits": 21.9,
"not_invoiced_fees_credits": 15,
"not_invoiced_fees_balance": 6.9,
"total_amount": 96.9,
"next_invoice_date": "2017-01-20T00:00:00Z",
const SITEMAP_CACHE_KEY = 'sitemap-cached-pages-v1'
self.addEventListener('install', event => {
event.waitUntil(cacheSitemap())
})
const cacheSitemap = _ => caches.open(SITEMAP_CACHE_KEY)
.then(cache =>
cacheSitemap()
.then(urls => urls.map(u => u.toString()))
@john-doherty
john-doherty / javascript-trim-svg-whitespace.js
Created October 21, 2016 13:39
Trim whitespace from SVG elements
function trimSvgWhitespace() {
// get all SVG objects in the DOM
var svgs = document.getElementsByTagName("svg");
// go through each one and add a viewbox that ensures all children are visible
for (var i=0, l=svgs.length; i<l; i++) {
var svg = svgs[i],
box = svg.getBBox(), // <- get the visual boundary required to view all children
@nolanlawson
nolanlawson / why_we_dropped_lerna_from_pouchdb.md
Last active December 13, 2023 10:56
Why we dropped Lerna from PouchDB

Why we dropped Lerna from PouchDB

We dropped Lerna from our monorepo architecture in PouchDB 6.0.0. I got a question about this from @reconbot, so I thought I'd explain our reasoning.

First off, I don't want this post to be read as "Lerna sucks, don't use Lerna." We started out using Lerna, but eventually outgrew it because we wrote our own custom thing. Lerna is still a great idea if you're getting started with monorepos (monorepi?).

Backstory: