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 / user.js
Created January 1, 2018 17:11
user.js for local development
/* copy the pref group below into a user.js file created in profile dir. e.g.
* Mac: /Users/<user>/Library/Application\ Support/Firefox/Profiles/<obfuscate_chars>.default/user.js
* Win: C:/Users/Username/Appdata/Roaming/Mozilla/Firefox/Profiles/<obfuscate_chars>.default/user.js
* Lnx: ~/.mozilla/firefox/<obfuscate_chars>.default/user.js
* Restart Firefox
*/
// local
user_pref("general.warnOnAboutConfig", false);
user_pref("services.sync.log.appender.file.logOnSuccess", true);
@rivy
rivy / unsafeWindow.user.js
Created January 1, 2018 17:17 — forked from mathiasbynens/unsafeWindow.user.js
`unsafeWindow` polyfill (for use in user scripts)
// ==UserScript==
// @name Emulate `unsafeWindow` in browsers that don’t support it.
// ==/UserScript==
// http://mths.be/unsafewindow
window.unsafeWindow || (
unsafeWindow = (function() {
var el = document.createElement('p');
el.setAttribute('onclick', 'return window;');
return el.onclick();
@rivy
rivy / trello-card-enhancer.user.js
Created January 2, 2018 23:43 — forked from phdd/trello-card-enhancer.js
Enhance Trello-cards with markdown based description with this Greasemonkey script.
// ==UserScript==
// @name Trello Card Enhancer
// @namespace https://gist.github.com/phdd/f3e8cf831c1c0b6fe324
// @description Enhance cards with markdown based description
// @copyright 2015+, Peter Heisig
// @version 1.3
// @updateURL https://gist.githubusercontent.com/raw/f3e8cf831c1c0b6fe324/trello-card-enhancer.js
//
// @match https://trello.com/*
// @match https://*.trello.com/*
@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.

@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 / 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
# 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 / 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!
@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 / 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