Skip to content

Instantly share code, notes, and snippets.

View rivy's full-sized avatar
🏠
Working from home

Roy Ivy III rivy

🏠
Working from home
View GitHub Profile
I have the 8 Ball in my back pocket. I figure that makes me kind of a defense contractor. And I ought to get paid like one, meaning grossly overpaid. -- Richard Kadrey: Kill City Blues
There's only one way to avoid criticism: do nothing, say nothing, be nothing. -- Aristotle
Two possibilities exist: Either we are alone in the Universe, or we are not. Both are equally terrifying. -- Arthur C. Clarke
History is a set of lies agreed upon. -- Napoleon Bonaparte
The only time the word "incorrectly" isn't spelled incorrectly is when it's spelled incorrectly.
Back when PHP had less than 100 functions, the function hashing mechanism was strlen(). In order to get a nice hash distribution of function names across the various function name lengths, names were picked specifically to make them fit into a specific length bucket. -- Rasmus Lerdorf
<Raborn> I just read a book about Stockholm Syndrome. It was pretty bad at first, but by the end I kinda liked it.
What language do deaf people think in?
"A five-tailed fox!" Owen
@rivy
rivy / updateNpm.bat
Last active November 5, 2022 18:26 — forked from johnmcase/updateNpm.bat
Update npm on windows
@setLocal EnableDelayedExpansion
@echo off
:: from <https://gist.github.com/rivy/c69563af410d8e8e6e105e5554578fc8>; cloned from https://github.com/coreybutler/nvm-windows/issues/300
set wanted_version=%~1
if NOT DEFINED wanted_version ( set "wanted_version=latest" )
if "!wanted_version!" == "latest" (
for /f %%i in ('npm show npm version') do set wanted_version=%%i
@rivy
rivy / README.md
Created July 26, 2018 20:16 — forked from dconnolly/README.md
All 100 Chromecast background images that are rotated through, linked to their original locations on Google hosting. Links to 2560 width versions, where available.
Verifying my Blockstack ID is secured with the address 1DoaWxzNQST6y4XCXYB365WeJ5S4qpydJ7 https://explorer.blockstack.org/address/1DoaWxzNQST6y4XCXYB365WeJ5S4qpydJ7
@rivy
rivy / TODO.md
Last active May 21, 2018 17:36 — forked from DavidEGrayson/README.md
Getting started with midipix
  • TODO: figure out how to debug with gdb
@rivy
rivy / Vagrantfile
Created April 22, 2018 18:28 — forked from tknerr/Vagrantfile
Sample Vagrantfile that works with all providers (virtualbox, aws, managed) and in combination with the vagrant-omnibus plugin
#
# Vagrantfile for testing
#
Vagrant::configure("2") do |config|
# the Chef version to use
config.omnibus.chef_version = "11.4.4"
def configure_vbox_provider(config, name, ip, memory = 384)
config.vm.provider :virtualbox do |vbox, override|
@rivy
rivy / gist:8b5d8cac0dcc061830f225172e532c5f
Created April 16, 2018 01:24 — forked from dmitshur/gist:6927554
How to `go get` private repos using SSH key auth instead of password auth.
$ ssh -A vm
$ git config --global url."[email protected]:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "[email protected]:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
# Add a domain user to a remote server local group, if your current user has admin over the remote machine
powershell -c ([ADSI]'WinNT://SERVER/Administrators,group').add('WinNT://DOMAIN/USER,user')
# Get all local groups on a remote server
powershell -c "([ADSI]'WinNT://SERVER,computer').psbase.children | where { $_.psbase.schemaClassName -eq 'group' } | foreach { ($_.name)[0]}"
# Find members of the local Administrators group on a remote server
powershell -c "$([ADSI]'WinNT://SERVER/Administrators,group').psbase.Invoke('Members') | foreach { $_.GetType().InvokeMember('ADspath', 'GetProperty', $null, $_, $null).Replace('WinNT://', '') }"
# Enable the local Administrator account on a remote server
@rivy
rivy / curl access to GitHub API.md
Last active March 17, 2018 21:41 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@rivy
rivy / list-all-repos.py
Created March 6, 2018 19:53 — forked from ralphbean/list-all-repos.py
Script to list all repos for a github organization
#!/usr/bin/env python
""" Print all of the clone-urls for a GitHub organization.
It requires the pygithub3 module, which you can install like this::
$ sudo yum -y install python-virtualenv
$ mkdir scratch
$ cd scratch
$ virtualenv my-virtualenv