Skip to content

Instantly share code, notes, and snippets.

View madhuravius's full-sized avatar

Madhu Ravi madhuravius

  • Maryland
View GitHub Profile
@madhuravius
madhuravius / pair-wii-remote-macos.sh
Created October 16, 2023 01:32 — forked from gingerbeardman/pair-wii-remote-macos.sh
Automatically pair a Wii Remote to macOS using blueutil command-line tool (Intel-only? fails on Apple silicon)
#!/usr/bin/env bash
# requirements: blueutil
echo "Hold both 1+2 buttons on Wii Remote and wait for 30 seconds"
# get MAC Address of Wii Remote
MAC=`$(which blueutil) --inquiry 5 2>&1 | grep 'address' | awk '{print substr($2,1,17)}'`
(killall -m 'blueutil*' 2>&1) >/dev/null
echo "MAC: $MAC"
@madhuravius
madhuravius / nixos.md
Created October 22, 2021 04:17 — forked from martijnvermaat/nixos.md
Installation of NixOS with encrypted root

Keybase proof

I hereby claim:

  • I am madhuravius on github.
  • I am oldmananger (https://keybase.io/oldmananger) on keybase.
  • I have a public key ASB_tunaUqUi_Q4LO1kARQUw7iJcZUXL9RTE_Zeu8wKOJgo

To claim this, I am signing this object:

@madhuravius
madhuravius / sentence_counter.js
Created September 4, 2016 23:18
victor_exercise_sentence
var sentence_object = {
// also has properties that are passed in:
// sentence (sentence content)
// count (number of words you want returned and position)
count_words: function (){
var sentence = this.sentence;
// split sentence to words
var words = sentence.split(' ');
// create object of words and counts
var words_counts = {};
@madhuravius
madhuravius / 0_reuse_code.js
Created June 30, 2016 20:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console