Skip to content

Instantly share code, notes, and snippets.

jamesmunns /
Created July 28, 2018 16:04 — forked from kylemanna/
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
spacejam /
Last active March 13, 2024 18:51
using rr with rust

using rust with rr

rr is a great debugging tool. it records a trace of a program's execution, as well as the results of any syscalls it executes, so that you can "rewind" while you debug, and get deterministic forward and reverse instrumented playback. it works with rust, but by default if you try it out, it could be pretty ugly when you inspect variables. if this bothers you, configure gdb to use a rust pretty-printer

rr is probably in your system's package manager.


tomhodgins / css-overlay.js
Last active September 21, 2018 00:34
Paste this into your console for an easy-to-edit, live-updating CSS overlay. Demo:
// CSS Overlay
var overlay_styles = document.createElement('style')
var virtual_stylesheet = document.createElement('style')
var textarea = document.createElement('textarea');
overlay_styles.textContent = `
[data-css=overlay] {
box-sizing: border-box;
margin: 0;
padding: 1em;
klaaspieter /
Created June 22, 2017 07:59 — forked from anonymous/
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

Where you able to produce a binary directly from the Rust build tools that you could submit to the app/play store?

Not quite, but I tried to get as close to that as was reasonably possible. Alas, things ended up a little convoluted.

For iOS, I have a nearly empty Xcode project with a build script that copies my cargo produced executable into the .app that Xcode generates (before Xcode signs it). The build script also uses lipo to merge the executables for each architecture I’m targeting (e.g. armv7 and aarch64 for non-simulator devices) into a single, universal binary.

On top of that, there are various iOS-y things that need to happen before my application’s main method is called. SDL2 provides the Objective-C code that does all of that. In a C or C++ game, SDL2 renames main to SDL_main, and then [inserts its own mai

$invocation = (Get-Variable MyInvocation).Value
cd (Split-Path $invocation.MyCommand.Path)
if ($Args[0] -eq "help") { return help }
if ($Args[0] -eq "--help") { return help }
if ($Args[0] -eq "-help") { return help }
if ($Args[0] -eq "/help") { return help }
if ($Args[0] -eq "?") { return help }
if ($Args[0] -eq "-?") { return help }
if ($Args[0] -eq "--?") { return help }
georgebrock / Info.plist
Last active December 8, 2023 22:12
AppleScript to handle URLs
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<!-- ... -->
<!-- Add this section: -->