Skip to content

Instantly share code, notes, and snippets.

Bradley Walters bmwalters

View GitHub Profile
@bmwalters
bmwalters / arch-linux-32-bit-chroot.md
Last active Jun 28, 2020
Creating a 32-bit Arch Linux chroot
View arch-linux-32-bit-chroot.md

on the host system

  1. Download an iso
  2. mkdir mounted-iso mounted-root root live
  3. sudo mount -o loop archlinux-2020.06.01-i686.iso mounted-iso/
  4. sudo mount -t squashfs mounted-iso/arch/i686/airootfs.sfs mounted-root/
  5. sudo cp -av mounted-root/. root/
  6. sudo umount mounted-root
  7. sudo umount mounted-iso
  8. sudo mount -o bind root live/
  9. sudo arch-chroot live bash
@bmwalters
bmwalters / _Solarized.terminal
Created Sep 26, 2019
my Terminal.app configuration
View _Solarized.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGIiNYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKYHCBMXGB9VJG51bGzVCQoLDA0ODxARElxOU0NvbXBvbmVudHNVTlNSR0JcTlND
b2xvclNwYWNlXxASTlNDdXN0b21Db2xvclNwYWNlViRjbGFzc08QJzAuMjMxMzcyNTQ5
IDAuMjU4ODIzNTI5NCAwLjMxNzY0NzA1ODggMU8QJzAuMTc1MzU2OTg0MSAwLjE5NTk5
@bmwalters
bmwalters / PKGBUILD
Last active Nov 20, 2018
Arch PKGBUILD for Vittorio Romeo's OpenHexagon / SSVOpenHexagon
View PKGBUILD
# Maintainer: Bradley Walters <oss@walters.app>
pkgname=openhexagon-git
pkgver=r1733.4791b23
pkgrel=1
pkgdesc='C++14 FOSS clone of "Super Hexagon"'
arch=('i686' 'x86_64' 'armv6h') # TODO: check these
url="https://vittorioromeo.info/projects.html"
license=('custom:AFL-3.0')
depends=('sfml' 'lua')
View resreader.py
#!/usr/bin/env python3
import os
import xml.etree.ElementTree as ElementTree
tree = ElementTree.parse("Resources.resx")
datas = sorted(map(lambda x: (x, len(x.find("value").text)), tree.getroot().findall("data")), key=lambda x: x[1])
if not os.path.isdir("Split_out/"):
@bmwalters
bmwalters / vimeofixer.user.js
Last active Dec 31, 2017
Re-enable the context menu on videos in the Vimeo embedded player
View vimeofixer.user.js
// ==UserScript==
// @name Vimeo Embed Playback Rate Control
// @namespace zerf
// @match *://player.vimeo.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
const log = (...args) => console.log("[ZERFVIMEO]", ...args)
@bmwalters
bmwalters / README.md
Last active Oct 26, 2018
Hopper solus package
View README.md

Hopper Disassembler package for Solus

This is a package for eopkg for the Hopper Disassembler.

Installation

sudo eopkg bi https://gist.githubusercontent.com/bmwalters/d453feb913492c23df06d78820fee4d7/raw/pspec.xml
sudo eopkg it hopper-disassembler-*.eopkg;sudo rm hopper-disassembler-*.eopkg
@bmwalters
bmwalters / hoax.lua
Last active Feb 14, 2017
ES2015 Promises implemented in Lua 5.3
View hoax.lua
local function check_callable(o)
return type(o) == "function" or type(getmetatable(o).__call) == "function"
end
local PromiseState = {
pending = "pending",
fulfilled = "fulfilled",
rejected = "rejected"
}
@bmwalters
bmwalters / npmify.lua
Created Jan 8, 2017
Load Lua modules from the node_modules folder!
View npmify.lua
local string = require("string")
local pathlib = require("pl.path")
local filelib = require("pl.file")
local function split(str, sep)
local ret = {}
local last_sep = 1
for i = 1, #str do
if string.byte(str, i, i) == string.byte(sep) then
View simple_version.py
class SimpleVersion():
def __init__(self, major, minor, patch):
self.major = major
self.minor = minor
self.patch = patch
@classmethod
def fromstring(c, version_str):
split = [int(x or "0") for x in version_str.split(".")]
You can’t perform that action at this time.