Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan Connolly dckc

View GitHub Profile
@toripiyo
toripiyo / code.gs
Last active Jan 20, 2022
create GitHub issues from selected range on Google SpreadSheet
View code.gs
const ui = SpreadsheetApp.getUi();
const userProperties = PropertiesService.getUserProperties();
const ACCESS_TOKEN = 'access token';
function setToken(){
const scriptValue = ui.prompt('Personal Access Token', ui.ButtonSet.OK);
userProperties.setProperty(ACCESS_TOKEN, scriptValue.getResponseText());
}
function removeToken(){
View uber-to-agoric.md

I have a bit of good news and bad news. Friday, April 3, was my last day at Uber. Monday, April 6, was my first day at Agoric.

I started at Uber 5½ years ago, on the dispatch system. I joined Tom Croucher’s team, which focused on common frameworks for marketplace systems, with Jake Verbaten, Russ Frank, and spiritually Matthew Esch. When I arrived, the scaffolding and frameworks were in place. I wrote a tool for verifying that JSON schema evolution remained backward-compatible, did some weird stuff to automatically mix the middleware stack, and wrote a thing to balance load across Node.js processes more fairly than the Linux kernel. I don’t believe any of that work made it to production, really, but for those six months, I learned how to operate global dispatch while I was on-call for 24 hours once a month and developed a bald spot.

I then got on board a new Distributed Systems Group under Matt Ranney’s guidance and many of the folks I’ve been working with to this day. Matt had designed a DHT based on the S

@taktoa
taktoa / seL4.nix
Last active Nov 9, 2017
seL4 Nix expression for Raspberry Pi 3 (may be broken!)
View seL4.nix
with rec {
pkgs = import <nixpkgs> {};
inherit (pkgs) stdenv gcc-arm-embedded libxml2 ncurses python27Packages;
inherit (pkgs) which fetchFromGitHub;
};
stdenv.mkDerivation rec {
name = "seL4";
src = fetchFromGitHub {
@drmalex07
drmalex07 / README-python-service-on-systemd-activated-socket.md
Last active Sep 11, 2022
An example network service with systemd-activated socket in Python. #systemd #python #socket #socket-activation
View README-python-service-on-systemd-activated-socket.md

README

The example below creates a TCP server listening on a stream (i.e. SOCK_STREAM) socket. A similar approach can be followed to create a UDP server on a datagram (i.e. SOCK_DGRAM) socket. See man systemd.socket for details.

An example server

Create an simple echo server at /opt/foo/serve.py.

@maxogden
maxogden / index.js
Last active May 9, 2021
fast loading of a large dataset into leveldb
View index.js
// data comes from here http://stat-computing.org/dataexpo/2009/the-data.html
// download 1994.csv.bz2 and unpack by running: cat 1994.csv.bz2 | bzip2 -d > 1994.csv
// 1994.csv should be ~5.2 million lines and 500MB
// importing all rows into leveldb took ~50 seconds on my machine
// there are two main techniques at work here:
// 1: never create JS objects, leave the data as binary the entire time (binary-split does this)
// 2: group lines into 16 MB batches, to take advantage of leveldbs batch API (byte-stream does this)
var level = require('level')