Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
building stuff on Tezos ꜩ

Diego spacecowb0y

💻
building stuff on Tezos ꜩ
View GitHub Profile
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created Feb 5, 2022
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
View killbutmakeitlooklikeanaccident.sh
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@shawwn
shawwn / since2010.md
Created May 11, 2021
"What happened after 2010?"
View since2010.md

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@ctsrc
ctsrc / README.md
Last active Sep 26, 2022 — 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)
View README.md
@dillonchanis
dillonchanis / example.css
Created Sep 20, 2020
Tailwind Utility for using gradients with text
View example.css
@layer utilities {
.text-gradient {
background-clip: text;
-webkit-text-fill-color: transparent;
}
}
View fastmail-jmap-quickstart.js
const fetch = require('node-fetch');
async function run() {
let username = "YOUR USERNAME HERE";
let password = "YOUR APP PASSWORD";
let authBasic = new Buffer(username + ':' + password).toString('base64');
let session = await (await fetch('https://jmap.fastmail.com/.well-known/jmap', {
headers: {
"Authorization": "Basic " + authBasic
}
})).json();
View plot.awk
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@katef
katef / life-utf8.c
Last active Sep 29, 2022
XBM to UTF-8 braille image things
View life-utf8.c
/*
* John Conway's Game of Life.
*
* This is written for POSIX, using Curses. Resizing of the terminal is not
* supported.
*
* By convention in this program, x is the horizontal coordinate and y is
* vertical. There correspond to the width and height respectively.
* The current generation number is illustrated when show_generation is set.
*
@roytang
roytang / fbtimeline.py
Created Jun 23, 2020
Script to scrape your FB timeline
View fbtimeline.py
import json
from pathlib import Path
from datetime import datetime
import frontmatter
import re, os
import string
from urllib.parse import urlparse, parse_qs, urldefrag
from urllib.error import HTTPError
import urllib.request
from bs4 import BeautifulSoup
@roytang
roytang / fbgroup.py
Created Jun 23, 2020
Script to scrape your FB groups
View fbgroup.py
import json
from pathlib import Path
from datetime import datetime
import frontmatter
import re, os
import string
from urllib.parse import urlparse, parse_qs, urldefrag
from urllib.error import HTTPError
import urllib.request
from bs4 import BeautifulSoup
@premek
premek / mv.sh
Last active May 8, 2022
Rename files in linux / bash using mv command without typing the full name two times
View mv.sh
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)