Skip to content

Instantly share code, notes, and snippets.

View Narvey's full-sized avatar

Nathan Harvey Narvey

View GitHub Profile
@Narvey
Narvey / .gitconfig
Created September 20, 2012 22:11 — forked from greneholt/.gitconfig
Git config (Nathan)
[alias]
com = commit -am
sync = commit -am "syncing";pull;push
st = status
pl = pull
co = checkout
examine = checkout
pushall = push --mirror
df = diff
dc = diff --cached
/**********************
* fordingTheRiver.js *
**********************
*
* And there's the river. Fortunately, I was prepared for this.
* See the raft on the other side?
*
* Everything is going according to plan.
*/
/*************
* colors.js *
*************
*
* You're almost at the exit. You just need to get past this
* color lock.
*
* Changing your environment is no longer enough. You must
* learn to change yourself. I've sent you a little something
* that should help with that.
@Narvey
Narvey / untrusted-lvl11-ifYouMust-solution.js
Created June 30, 2014 04:15
If you MUST disallow overriding functions, I'll do it this way...
/*
* robot.js
*
* You'll need three keys in order to unlock the
* Algorithm: the red key, the green key, and the
* blue key. Unfortunately, all three of them are
* behind human-proof barriers.
*
* The plan is simple: reprogram the maintenance
* robots to grab the key and bring it through
@Narvey
Narvey / untrusted-lvl13-general-solution.js
Last active August 29, 2015 14:03
This is a general solution to ANY maze (except for the assumption of the location of the key, but if you comment that out, it works anywhere.) **editing to remove extra newlines
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/
@Narvey
Narvey / untrusted-lvl11-Sorta-Solution.js
Created July 4, 2014 19:50
Keep hitting refresh until there is a clear yellow (or red) path!
/*************
* lasers.js *
*************
*
* Time to unleash the killer lasers! Each laser will kill you
* unless you have the appropriate color. Too bad you can't
* see which color corresponds to which laser!
*/
function getRandomInt(min, max) {
/*****************
* bossFight.js *
*****************
*
* NO FARTHER, DR. EVAL!!!!
* YOU WILL NOT GET OUT OF HERE ALIVE!!!!
* IT'S TIME YOU SEE MY TRUE FORM!!!!
* FACE MY ROBOT WRATH!!!!!
*/
@Narvey
Narvey / .gitconfig
Last active September 16, 2020 22:05
Git configuration file for my aliases and settings.
[branch]
autoSetupMerge = always
[alias]
st = status
ca = commit -am
br = branch
co = checkout
clr = reset HEAD
df = diff
dc = diff --cached
@Narvey
Narvey / Delete certain lines.yaml
Last active June 29, 2017 22:56
Deletes lines that have certain text in cell B - Shared with Script Lab
name: Delete certain lines
description: Deletes empty lines and lines that have certain text in cell B representing a row that is not in use
author: Narvey
host: EXCEL
api_set: {}
script:
content: "$(\"#run\").click(run);\r\n\r\nasync function run()\r\n{\r\n try\r\n {\r\n await Excel.run(async (ctx) =>\r\n {\r\n var deleteVal = document.getElementById(\"delete\").value.toLocaleLowerCase()\r\n var rows = ctx.workbook.worksheets.getActiveWorksheet().getUsedRange().load(\"values\")\r\n await ctx.sync()\r\n var rowNum = 0, used = 0, v = \"\"\r\n for (rowNum = rows.values.length-1; rowNum >= 0; rowNum--)\r\n {\r\n v = rows.values[rowNum][1]\r\n if (v == null || v.length == 0 || v.toLocaleLowerCase() == deleteVal)\r\n {\r\n rows.getRow(rowNum).delete(\"Up\")\r\n await ctx.sync()\r\n }\r\n }\r\n await ctx.sync
@Narvey
Narvey / keybase.md
Last active December 12, 2017 04:56

Keybase proof 

I hereby claim:    * I am narvey on github.   * I am narvey (https://keybase.io/narvey) on keybase.   * I have a public key ASA3740YPwKCGzJR-OG-1yuStuw3658JS_HS-y0d6seAUAo  To claim this, I am signing this object: 

{   "body": {     "key": {       "eldest_kid": "012037ef8d183f02821b3251f8e1bed72b92b6ec37eb9f094bf1d2fb2d1deac780500a",       "host": "keybase.io",       "kid": "012037ef8d183f02821b3251f8e1bed72b92b6ec37eb9f094bf1d2fb2d1deac780500a",       "uid": "8c63133b85b3c3570a97509af8cbb719",       "username": "narvey"     },     "merkle_root": {       "ctime": 1511311852,       "hash": "ce99e6d32c18fd500f433b508cb2dc95c76c056aa374141b9b2e5bef1f72cdacfcc140cbf0dcef21fa88d3bd4572679c47252c1892b91bb9097eff95e2a49541",       "hash_meta": "f75722ce231e0c3e88944acffebcbeee2eb0abd5cd8f8746954ca63e58f8982b",       "seqno": 1729031     },     "service": {       "name": "github",       "username": "narvey"     },     "type": "web_service_binding",     "version": 1   },   "client": {     "n