Skip to content

Instantly share code, notes, and snippets.

View zph's full-sized avatar

Zander Hill zph

View GitHub Profile
import mysql.connector
import re
slow_log_files = ['file1','file2']
table = "slow_log"
connection = mysql.connector.connect(
host="127.0.0.1",
@adtac
adtac / README.md
Last active October 27, 2024 08:53
Using your Kindle as an e-ink monitor

3.5 fps, Paperwhite 3
@adtac_

step 1: jailbreak your Kindle

mobileread.com is your best resource here, follow the instructions from the LanguageBreak thread

I didn't really follow the LanguageBreak instructions because I didn't care about most of the features + I was curious to do it myself, but the LanguageBreak github repo was invaluable for debugging

@oxc
oxc / node-execv.ts
Last active July 30, 2024 01:05
Call execv (works similar for execvp, execve) on Node 20
import ref from "ref-napi";
import ffi from "ffi-napi";
import ref_array_di from "ref-array-di";
const ArrayType = ref_array_di(ref);
const StringArray = ArrayType("string");
// from fcntl.h
const F_GETFD = 1; /* get close_on_exec */
@NeKzor
NeKzor / libc_ffi.ts
Last active July 30, 2024 02:32
Deno FFI feat. libc.
export const libc = Deno.dlopen(
"libc.so.6",
{
dl_iterate_phdr: {
parameters: ["function", "pointer"],
result: "i32",
},
readlink: {
parameters: ["buffer", "buffer", "isize"],
result: "isize",
@shanness
shanness / jira-search
Created November 5, 2023 03:44
jira CLI search with fzf and caching
@ctsrc
ctsrc / README.md
Last active September 11, 2024 19:51 — forked from niw/README.en.md
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
@asoorm
asoorm / docker-compose-mongo-replicaset.yml
Created September 14, 2018 19:00
Mongo Replica Set docker compose
version: "3"
services:
mongo1:
hostname: mongo1
container_name: localmongo1
image: mongo:4.0-xenial
expose:
- 27017
ports:
- 27011:27017
@KrustyHack
KrustyHack / doc.adoc
Last active September 19, 2024 16:37
proxmox-ubuntu-cloud-howto

Cloud-Init Support

Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network

@unakatsuo
unakatsuo / dropbox_poll.go
Created October 15, 2017 02:43
Dropbox ListFolderLongPoll example with no HTTP Authorization header
package dropbox
import (
"log"
"net/http"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files"
)
@ianchen06
ianchen06 / del_cluster.sh
Created June 26, 2017 10:29
delete proxmox cluster
# source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/
#/bin/sh
# stop service
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
# edit through sqlite, check, delete, verify