Skip to content

Instantly share code, notes, and snippets.

View danielledeleo's full-sized avatar

Dani De Leo danielledeleo

View GitHub Profile
@danielledeleo
danielledeleo / nginx.conf
Last active September 20, 2019 13:42
Nginx tilde.club clone conf
# my humble homage to tilde.club
server {
listen 80;
# to disallow anything other than what's below (like a direct IP)
server_name _;
}
server {
listen 80;
@danielledeleo
danielledeleo / littlegrep_async.js
Last active January 7, 2016 20:41
A little asynchronous grep
(function() {
const fs = require('fs');
if (process.argv.length < 4) {
console.error('Not enough parameters given. Try this: "node littlegrep_async filename.txt term"');
process.exit(1);
}
filename = process.argv[2];
searchterm = process.argv[3];
@danielledeleo
danielledeleo / littlegrep_sync.js
Last active January 7, 2016 21:14
A little synchronous grep
(function() {
const fs = require('fs');
if (process.argv.length < 4) {
console.error('Not enough parameters given. Try this: "node findinfile_sync filename.txt term"');
process.exit(1);
}
const filename = process.argv[2];
const searchterm = process.argv[3];
@danielledeleo
danielledeleo / littlemultifilegrep.js
Created January 7, 2016 21:23
A little asynchronous multi-file grep
(function() {
const fs = require('fs');
if (process.argv.length < 4) {
console.error('Not enough parameters given. Try this: "node littlemultifilegrep filename.txt term"');
process.exit(1);
}
filenames = process.argv.slice(2, -1);
searchterm = process.argv.slice(-1);
@danielledeleo
danielledeleo / cb-4th-patrons-call.md
Last active October 12, 2017 22:45
Citybound: 4th Patrons Call Notes

Citybound: 4th Patron's Call Notes

Favourites and Discovery

  • To reduce search space of "is there a new favourite/better alternative" shop to get <something>
    • Cims may not be aware of the "new pizza place" that just opened (and only consider places they know exist)
    • some other event needs to trigger their awareness of it, like:
      • from walking/driving by the place
  • proximity to Cims who know about it (family, coworkers, people at the park..)
#include "dz60.h"
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
@danielledeleo
danielledeleo / start.sh
Created April 16, 2024 20:45
PaperMC startup script
#!/bin/bash
set -e
VERSION=1.20.4
LATEST_JSON=$(curl -X 'GET' \
"https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds" \
-H 'accept: application/json' \
| jq '.builds | last ')