Skip to content

Instantly share code, notes, and snippets.

View dacioromero's full-sized avatar

Dacio dacioromero

View GitHub Profile
@dacioromero
dacioromero / in-memory-storage.ts
Last active February 13, 2024 02:29
TypeScript Storage Implementation
class InMemoryStorage implements Storage {
private data = new Map<string, string>()
clear (): void {
this.data.clear()
}
getItem (key: string): string | null {
return this.data.get(String(key)) ?? null
}
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/c263y9cclpa3v0zxmj3y8lffgyz2b5gy-source
source root is source
Executing cargoSetupPostUnpackHook
Finished cargoSetupPostUnpackHook
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
applying patch /nix/store/pvwhnnvfbhkgv1ihzf27c0rvwa599fjc-no-post-install.patch
patching file meson.build
@dacioromero
dacioromero / gopro.py
Created March 25, 2021 06:07
Script to stitch together GoPro recordings with FFmpeg
import glob
from collections import defaultdict
import subprocess
from os import path
def main(dest = ''):
recordings = defaultdict(list)
for file in glob.glob(f'GH{"[0-9]" * 6}.MP4'):
chapter = file[2:4]
local WARP_MIN = 64 * 4
local posPath = fs.combine(shell.dir(), "transport.pos")
local endAutomata = peripheral.find("endAutomata")
function getTotalItemCount ()
local count = 0
-- Slot 1 is for fuel
for slot=2,16 do
count = count + turtle.getItemCount(slot)

Keybase proof

I hereby claim:

  • I am dacioromero on github.
  • I am dacio (https://keybase.io/dacio) on keybase.
  • I have a public key ASBw-rFZgsckVnIfVe6pzytVzJRX8nXvLX-nA0W8U1dQ5Qo

To claim this, I am signing this object:

<script lang="typescript">
import { writable } from 'svelte/store'
const store = writable(localStorage.getItem('key') ?? '')
store.subscribe(value => localStorage.setItem('key', value))
</script>
<input bind:value={$store} />
@dacioromero
dacioromero / AdvancedWindowSnap-Dacio.ahk
Last active October 30, 2020 05:21 — forked from AWMooreCO/AdvancedWindowSnap.ahk
Advanced Window Snap is a script for AutoHotKey that expands upon Windows built-in window-snapping hotkeys.
/**
* Advanced Window Snap
* Snaps the Active Window to one of nine different window positions.
*
* @author Andrew Moore <andrew+github@awmoore.com>, Dacio Romero <DacioRomero@gmail.com>
* @version 1.01
*/
/**
* SnapActiveWindow resizes and moves (snaps) the active window to a given position.
@dacioromero
dacioromero / fi-jquery.user.js
Last active October 29, 2020 19:52
Fuck It!
// ==UserScript==
// @name Fuck It! jQuery
// @namespace https://gist.github.com/dacioromero/2646ac7e1d0bfd0ec88fb47b3d1e577a
// @description jQuery injector for your jQuery addiction
// @author Dacio Romero <me@dacio.dev>
// @homepageURL https://gist.github.com/dacioromero/2646ac7e1d0bfd0ec88fb47b3d1e577a
// @run-at document-idle
// @match *://*/*
// @grant none
// @version 1.0.0
@dacioromero
dacioromero / crontab
Last active May 22, 2020 08:48
Update qBittorrent trackers from https://github.com/ngosang/trackerslist daily
@daily /usr/local/bin/python3 /root/update-trackers.py
version: "3"
services:
vpn:
image: "dperson/openvpn-client"
network_mode: "bridge"
cap_add:
- "NET_ADMIN"
devices:
- "/dev/net/tun"
environment: