Skip to content

Instantly share code, notes, and snippets.

var _ = require('lodash');
var hand = []
var input = [process.argv[2], process.argv[3], process.argv[4], process.argv[5], process.argv[6]]
var isSuited
var isStraight
var sortedHand = []
var cardOrder = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']
var analyzeHand = function() {
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
@runofthemill
runofthemill / roots-aliases.plugin.zsh
Last active August 8, 2018 15:09
Aliases for navigating a Roots project in a local environment. Inspired by https://gist.github.com/knowler/7c0686c4c1876980657f369213287749
root() {
local root
if [[ "$PWD" == *"/trellis"* ]]; then
root=${PWD%/trellis*}
elif [[ "$PWD" == *"/site"* ]]; then
root=${PWD%/site*}
elif [[ -d "$PWD/trellis" || -d "$PWD/site" ]]; then
root=${PWD}
fi
@runofthemill
runofthemill / NoVNC_Paste.js
Created November 13, 2018 02:04 — forked from byjg/NoVNC_Paste.js
How to Paste code to NoVNC.
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
window.sendString = function (str) {
f(str.split(""));
function f(t) {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = character.match(/[a-z!@#$%^&*()_+{}:\"<>?~|]/);
@runofthemill
runofthemill / vagrant.zsh
Created December 27, 2018 23:28
Vagrant plugin for spaceship-prompt
#
# Vagrant
#
# Vagrant is a tool for building and managing virtual machine environments in a single workflow.
# Link: https://www.vagrantup.com
# ------------------------------------------------------------------------------
# Configuration
# ------------------------------------------------------------------------------

Keybase proof

I hereby claim:

  • I am runofthemill on github.
  • I am runofthemill (https://keybase.io/runofthemill) on keybase.
  • I have a public key ASDm6AAKR6eXu1Ok4GDiQbRl_HGuTy4EcsYjFSRvXrka-Qo

To claim this, I am signing this object:

@runofthemill
runofthemill / config.plist
Created December 10, 2019 03:31
opencoreeeeee
<?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>ACPI</key>
<dict>
<key>Add</key>
<array>
<dict>
<key>Comment</key>
@runofthemill
runofthemill / README.md
Created March 3, 2020 20:40
Lazy loaded NVM version in iTerm2 Status Bar component

Source custom.zsh in your zsh profile, then in iTerm 2 go to Preferences -> Profiles -> Session, and under Miscellaneous check "Status bar enabled" then click "Configure Status Bar".

Add an Interpolated String component, then configure the String Value to be \(user.nodeVersion) (adjust to match the name of the variable set in iterm2_print_user_vars(), if different)

Now when you load a new session with the configured profile, the Status Bar will show "unset" until node is loaded from nvm, and will show the correct version whenever nvm use is called.