Skip to content

Instantly share code, notes, and snippets.

View rodtreweek's full-sized avatar

Rod Treweek rodtreweek

  • Portland, OR
View GitHub Profile

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access:
@rodtreweek
rodtreweek / disable-adobe.sh
Created August 20, 2019 01:08 — forked from justinlevi/disable-adobe.sh
Disable all Adobe Processes
#!/bin/bash
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.ARMDCHelper.cc24aef4a1b90ed56a725c38014c95072f92651fb65e1bf9c8e43c37a23d420d.plist
launchctl unload -w /Library/LaunchDaemons/com.adobe.agsservice.plist
launchctl unload -w /Library/LaunchDaemons/com.adobe.ARMDC.Communicator.plist
launchctl unload -w /Library/LaunchDaemons/com.adobe.ARMDC.SMJobBlessHelper.plist
launchctl unload -w /Library/LaunchDaemons/com.adobe.adobeupdatedaemon.plist
sudo launchctl unload -w /Library/LaunchDaemons/com.adobe.ARMDC.Communicator.plist
@rodtreweek
rodtreweek / vim-cheatsheet.md
Created June 21, 2019 13:37 — forked from azadkuh/vim-cheatsheet.md
vim / vimdiff cheatsheet - essential commands

Vim cheat sheet

Starting Vim

vim [file1] [file2] ...

@rodtreweek
rodtreweek / GPG and git on macOS.md
Last active June 12, 2019 03:48 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail -- or you might try doing brew cask install gpg-suite.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys or gpg --list-secret-keys --keyid-format LONG and look for sec, use the key ID for the next step.
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
@rodtreweek
rodtreweek / 00_ha_dnscrypt_proxy_client_setup.markdown
Created March 5, 2019 12:13
Highly-available dnscrypt-proxy client setup on OSX with DNSSEC.

Tested, works!

Install

git clone https://gist.github.com/fccbf0f02355a31f7959 && cd fccbf0f02355a31f7959 && sh install.sh && cd .. && rm -rf fccbf0f02355a31f7959

Uninstall

git clone https://gist.github.com/fccbf0f02355a31f7959 && cd fccbf0f02355a31f7959 && sh uninstall.sh && cd .. && rm -rf fccbf0f02355a31f7959

@rodtreweek
rodtreweek / README.md
Created March 5, 2019 11:57 — forked from ahmozkya/README.md
Homebrew with DNSMasq + DNSCrypt-proxy (OpenDNS)

Install & Configure

  1. Install DNSMasq
$ brew install dnsmasq
  1. Install DNSCrypt-proxy
$ brew install dnscrypt-proxy
@rodtreweek
rodtreweek / .zshrc
Created October 7, 2018 19:43 — forked from reidblomquist/.zshrc
zshrc (w/ prezto and powerlevel9k)
#
# Reid Blomquist's zshrc
#
# stuff being used:
# - zsh
# - prezto
# - powerlevel9k
# - a bunch of other shit
#
@rodtreweek
rodtreweek / add CA cert on CentOS.md
Created July 24, 2018 19:49 — forked from kekru/add CA cert on CentOS Debian Ubuntu.md
Add CA cert to local trust store on CentOS or Debian
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://thewebsite.org
@rodtreweek
rodtreweek / WSL-ssh-server.md
Created July 12, 2018 19:07 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Uninstall and reinstall the ssh server using the following commands:
    1. sudo apt remove openssh-server
    2. sudo apt install openssh-server
  2. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
  3. Change UsePrivilegeSeparation to no