Skip to content

Instantly share code, notes, and snippets.

View ohnx's full-sized avatar
💭
:shipit:

Mason ohnx

💭
:shipit:
View GitHub Profile
@ohnx
ohnx / app-deny.sh
Last active August 29, 2015 14:27
prevent apps from opening
#!/bin/bash
while true; do
#Office Apps
osascript -e 'tell application "System Events" to keystroke "q" using command down' &
var=$((`killall -v "Microsoft Word" | wc -l` + `killall -v "Microsoft PowerPoint" | wc -l` + `killall -v "Keynote" | wc -l` + `killall -v "Pages" | wc -l` + `killall -v "Numbers" | wc -l`))
#Misc Apps
var+=$((`killall -v iBooks | wc -l` + 0))
var+=$((`killall -v GarageBand | wc -l` + 0))
var+=$((`killall -v "App Store" | wc -l` + 0))
var+=$((`killall -v "iTunes" | wc -l` + 0))
@ohnx
ohnx / index.md
Last active February 6, 2022 22:26
CC41-a

intro

The cc41-a can be kind of hard to use, so I figured I'd make a blog post about it.

So, without further ado, here's a ohnx terribly explains™ post explaining how I got my CC41-a working (because after all, I am the center of the universe):

intro x2

First off, how do you know if you have a cc41-a?

  1. Power the CC41-a using 5V (assuming you have a breakout board, otherwise, I think you need to use 3.3V)
@ohnx
ohnx / index.md
Created May 29, 2016 18:45
RC522
/*
 * --------------------------------------------------------------------------------------------------------------------
 * Example sketch/program showing how to read data from a PICC to serial.
 * --------------------------------------------------------------------------------------------------------------------
 * This is a MFRC522 library example; for further details and other examples see: https://github.com/miguelbalboa/rfid
 * 
 * Example sketch/program showing how to read data from a PICC (that is: a RFID Tag or Card) using a MFRC522 based RFID
 * Reader on the Arduino SPI interface.
 * 
@ohnx
ohnx / README.md
Last active February 16, 2017 17:51
FakePlayers UUID and name

FakePlayers UUID and name for use in servers to OP them to bypass plugins liek GriefPrevention and Towny

mod player uuid player name notes
BuildCraft 77456a1f-b9f9-3f84-8863-ddef5b8e2209 [BuildCraft] UUID is the UUID.nameUUIDFromBytes("buildcraft.core".getBytes())
ComputerCraft 0d0c4ca0-4ff1-11e4-916c-0800200c9a66 ComputerCraft no [ and ] around the name
Draconic Evolution 5b5689b9-e43d-4282-a42a-dc916f3616b7 [Draconic-Evolution] Grinder
Ender IO 3baa66fa-a69a-11e4-89d3-123b93f75cba [EioKillera] Killer Joe
Thermal Expansion 5ae51d0b-e8bc-5a02-09f4-b5dbb05963da [CoFH] common for all CoFHLib mods?

Keybase proof

I hereby claim:

  • I am ohnx on github.
  • I am ohnx (https://keybase.io/ohnx) on keybase.
  • I have a public key whose fingerprint is 3797 7596 FBA9 1303 9511 6E5A 1D06 7752 0535 327F

To claim this, I am signing this object:

@ohnx
ohnx / style.css
Last active January 17, 2018 00:54
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,300);@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700,500,300);@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes b{0%{opacity:1}50%{opacity:0}to{opacity:1}}[src$="blue.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDA5Njg4IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptLTIgMTVsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=)}[src$="red.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjRjQ0MzM2IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMSAxNWgtMnYtMmgydjJ6bTAtNGgtMlY3aDJ2NnoiLz48L3N2Zz4=)}[src$="yellow.p
@ohnx
ohnx / libvirt-bootstrap.sh
Last active October 3, 2017 18:28 — forked from brenard/libvirt-bootstrap.sh
libvirt-bootstrap.sh adapted for Debian Jessie
#!/bin/sh -
#===============================================================================
# vim: softtabstop=4 shiftwidth=4 expandtab fenc=utf-8 spell spelllang=en cc=81
#===============================================================================
#
# FILE: bootstrap-webvirtmgr.sh
#
# DESCRIPTION: Bootstrap webvirtmgr installation for various distributions
#
# BUGS: https://github.com/retspen/webvirtmgr-boostrap/issues
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.76
Comment: https://keybase.io/crypto
wcBMA3GOjzBTqTV/AQf+MWyPCW5CchENjCUF8PYBcCBrjP3VVTpnGUvXXonMLp5r
NQOJKLJgjAVjBmtPn/1w6jlT4Emt54odb+9NnmHCdfM5a3DUxsnpgh3uN8EZQt3Z
KPYR67laqPPQRD76bN9iEkA/MiN3w9ZzuAwb2B6LZPDC/yykNqVG4H34G9t0pAmj
YoxVCw7Prqe7e96f6AJU9A7Zx+c6Xlf10jynbeDwAPYo2d4j3FMdO7/MnvU2eZuB
UQb2O6JhzR/HvADbUBGGyg66puY4VGdP32c6znZlff06VMWV4toANVRspyj+wtZc
+C3eBzVvZELkqC/w9OeFC7I811moWdHLbr0r3/t+NMHATANxjo8wU6k1fwEIAKPt

PuTTY colour scheme copied from cloud9's terminal

@ohnx
ohnx / README.md
Last active January 4, 2018 21:31
Giving userspace access to EFI NVRAM variables

Haiku has an EFI bootloader now (I'm a few months late to the party, sorry). Yay!

Now, on to the next step... allowing user applications to access EFI-related things, e.g. EFI NVRAM.

From my understanding, there's three things that need to happen before userspace applications can take advantage of EFI variables:

  1. Pass RuntimeServices to the kernel

This shouldn't be too bad to implement. Add an additional variable to struct kernel_args which will be NULL on non-EFI systems, and will be a pointer to the RuntimeServices on EFI systems.