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
@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."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	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
@rivy
rivy / buildable-git-repo.md
Created February 5, 2018 23:37 — forked from miyagawa/buildable-git-repo.md
Buildable git repo for CPAN

Buildable, Testable, Installable Git repo for Perl modules

tl;dr We might need a standard build file to build a module from Git repository, especially for the ones using Module::Install or dzil.

The problem

When an author of CPAN module uses an authoring tool that generates build files when shipping them to CPAN, the git repository usually doesn't have enough files to build, test and install the module.

For example, if dzil (Dist::Zilla) is used, the repository only conatains dist.ini and there's no Makefile.PL or Build.PL so standard CPAN installers or Continuous Integration tools don't know how to run tests on it.