Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
#!/bin/sh
set -e
# script to install maven
# todo: add method for checking if latest or automatically grabbing latest
mvn_version=${mvn_version:-3.5.2}
url="http://www.mirrorservice.org/sites/ftp.apache.org/maven/maven-3/${mvn_version}/binaries/apache-maven-${mvn_version}-bin.tar.gz"
install_dir="/opt/maven"
@x0nu11byt3
x0nu11byt3 / elf_format_cheatsheet.md
Created February 27, 2021 05:26
ELF Format Cheatsheet

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@imneme
imneme / splitmix.hpp
Created July 4, 2018 04:24
A C++ implementation of SplitMix
#ifndef SPLITMIX_HPP_INCLUDED
#define SPLITMIX_HPP_INCLUDED 1
/*
* A C++ implementation of SplitMix
* Original design by Guy L. Steele, Jr., Doug Lea and Christine H. Flood
* Described in _Fast splittable pseudorandom number generators_
* http://dx.doi.org/10.1145/2714064.2660195 and implemented in
* Java 8 as SplittableRandom
* Based on code from the original paper, with revisions based on changes
@kirelagin
kirelagin / tor-change-exitnode
Last active April 23, 2024 10:23
Shell script to force Tor exit node change
#!/bin/sh
###
#
# Change Tor exit node
#
# Sometimes when using Tor you'd like to change the IP address that
# servers see when you connect (that is, change your Tor exit node).
# This happens automatically from time to time, but this shell script
# lets you force it.
#
@joaohcrangel
joaohcrangel / validation-cpf.ts
Last active April 23, 2024 10:22
Função para validar CPF em TypeScript
function isValidCPF(value: string) {
if (typeof value !== 'string') {
return false;
}
value = value.replace(/[^\d]+/g, '');
if (value.length !== 11 || !!value.match(/(\d)\1{10}/)) {
return false;
}
@xiaopc
xiaopc / draw_table.py
Last active April 23, 2024 10:21
Draw a table using only Pillow
from PIL import Image, ImageFont, ImageDraw
from collections import namedtuple
def position_tuple(*args):
Position = namedtuple('Position', ['top', 'right', 'bottom', 'left'])
if len(args) == 0:
return Position(0, 0, 0, 0)
elif len(args) == 1:
return Position(args[0], args[0], args[0], args[0])
  • Agre, Philip E. „Conceptions of the user in computer systems design“. In CAMBRIDGE SERIES ON HUMAN COMPUTER INTERACTION, 67–106. CAMBRIDGE SERIES ON HUMAN COMPUTER INTERACTION, 1995.
    • Similar to Woolgar’s studies on the topic
  • Agre, Philip E “Surveillance and capture: Two models of privacy”, The information society, 1994, 101-127.
    • More interesting from a theoretical aspect, as Agre traces how studies of work and the subsequent implementation of these workflows in products is not a neutral act but changes the very work it analyzed. 
  • Anderson, R. J. „Representations and Requirements: The Value of Ethnography in System Design“. Human-computer Interaction 9, Nr. 2 (1994): 151–182. https://doi.org/10.1207/s15327051hci0902_1.
    • What do Designers mean when they say ‘Ethnography’: “Instead of fixing upon [Ethnographies] analytic aspects, designers have defined it as a form of data collection.”
  • Akrich, Madeleine. „The De-scription of Technic
@VictorTaelin
VictorTaelin / sat.md
Last active April 23, 2024 10:19
Simple SAT Solver via superpositions

Solving SAT via interaction net superpositions

I've recently been amazed, if not mind-blown, by how a very simple, "one-line" SAT solver on Interaction Nets can outperform brute-force by orders of magnitude by exploiting "superposed booleans" and optimal evaluation of λ-expressions. In this brief note, I'll provide some background for you to understand how this works, and then I'll present a simple code you can run in your own computer to observe and replicate this effect. Note this is a new observation, so I know little about how this algorithm behaves asymptotically, but I find it quite

@jossef
jossef / force-delete-k8s-namespace.py
Created August 13, 2020 12:50
force delete k8s namespace
#!/usr/bin/env python3
import atexit
import json
import requests
import subprocess
import sys
namespace = sys.argv[1]
proxy_process = subprocess.Popen(['kubectl', 'proxy'])
atexit.register(proxy_process.kill)