Skip to content

Instantly share code, notes, and snippets.

Nathan Harvey Narvey

Block or report user

Report or block Narvey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am narvey on github.
  • I am narvey ( on keybase.
  • I have a public key ASA6aH67S1zZaRHa3p3UWn-fl7VFJHrsQd48Ffpa8TOPrwo

To claim this, I am signing this object:

Narvey / decoding.js
Created Feb 1, 2019
a snippet of a decoder I wrote real quick for this dumb hex-based encoding Proofpoint uses for email subject lines
View decoding.js
working = working.replace(/C/,'2')
Narvey / SpotlightImageFinder.ps1
Created Dec 13, 2018
You know those pretty Windows 10 lock screen Spotlights? Sometimes it can be hard to find the one you want when all the file extensions are janky. Well use this script to pull all the recent ones up in tabs in FireFox, then you can right-click and save image for the one you want.
View SpotlightImageFinder.ps1
$daysBack = 3
$list = ls "$env:LOCALAPPDATA\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets" | `
Where-Object {$_.Length -gt 90000 -and ([datetime]::Now - $_.LastWriteTime) -lt [timespan]::FromDays($daysBack)}
foreach ($file in $list)
& "C:\Program Files\Mozilla Firefox\firefox.exe" $file.FullName
View Everywhere.ahk
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
#SingleInstance force
SetTitleMatchMode,%defaultMode% ;mainly for sub-scripts that may actually need to match on title.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;Ctr-Sft-?: Help window listing shortcuts

Keybase proof 

I hereby claim:    * I am narvey on github.   * I am 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": "",       "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
Narvey / Delete certain lines.yaml
Last active Jun 29, 2017
Deletes lines that have certain text in cell B - Shared with Script Lab
View Delete certain lines.yaml
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: {}
content: "$(\"#run\").click(run);\r\n\r\nasync function run()\r\n{\r\n try\r\n {\r\n await (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 / .gitconfig
Last active Nov 25, 2016
Git configuration file for my aliases and settings.
View .gitconfig
autoSetupMerge = always
st = status
ca = commit -am
br = branch
co = checkout
clr = reset HEAD
df = diff
dc = diff --cached
View untrusted-lvl20-solution.js
* bossFight.js *
Narvey / untrusted-lvl11-Sorta-Solution.js
Created Jul 4, 2014
Keep hitting refresh until there is a clear yellow (or red) path!
View untrusted-lvl11-Sorta-Solution.js
* 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) {
Narvey / untrusted-lvl13-general-solution.js
Last active Aug 29, 2015
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
View untrusted-lvl13-general-solution.js
* 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.
You can’t perform that action at this time.