Skip to content

Instantly share code, notes, and snippets.

View cuylerstuwe's full-sized avatar
Drinking covfefe.

Cuyler Stuwe cuylerstuwe

Drinking covfefe.
View GitHub Profile
@cuylerstuwe
cuylerstuwe / Local PR test and merge.md
Created December 3, 2019 13:29 — forked from adam-p/Local PR test and merge.md
Testing a pull request, then merging locally; and avoiding TOCTOU

It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream.)

Getting the PR code

  1. Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37

  2. Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37:

$ git fetch upstream pull/37/head:pr37
@cuylerstuwe
cuylerstuwe / setup-gh-cli-auth-2fa.md
Created November 13, 2019 01:55 — forked from ateucher/setup-gh-cli-auth-2fa.md
Setup git on the CLI to use 2FA with GitHub

These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.

  1. Download and install the git command-line client (if required).

  2. Open the git bash window and introduce yourself to git (if required):

    git config --global user.name 'Firstname Lastname'
    git config --global user.email 'firstname.lastname@gov.bc.ca'
    
// ==UserScript==
// @name A9 - Are the items exact? - Keybinds
// @version 1.0.1
// @include hit_set_id:3NE6EBGK58WRF4Y79I0YPEOFMAE3EQ
// @require https://gist.github.com/salembeats/7148acc820cdbc73f9c6d1f5a74f2844/raw/bc19f574867153816ca011a495284eddf1f12fac/mturk-hit-shorthand.user.library.js
// ==/UserScript==
const settings = { autoSubmit: false };
const submit = () => $('#submitButton').click();
@cuylerstuwe
cuylerstuwe / introrx.md
Created July 30, 2019 01:47 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@cuylerstuwe
cuylerstuwe / nginxproxy.md
Created February 26, 2019 06:15 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@cuylerstuwe
cuylerstuwe / github_gpg_key.md
Last active February 16, 2019 09:13 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Signing GitHub Commits Using GPG (Ubuntu/Mac)

Ubuntu Prerequisites

sudo apt-get install gpa seahorse

OSX Prerequisites

brew install gpg

// ==UserScript==
// @name Public -Testing Headers
// @namespace salembeats forked by jrw254 (sabedth)
// @version 1.1
// @description Links to whatever you want on the Overview & Earnings Bar Original code by salembeats with a small tweak to place inside this specific navbar
// Combine this with Forking Panda Links on mTurk Dashboard for double the links!
// @author Cuyler Stuwe (salembeats) forked by jrw254 (sabedth)
// @include https://worker.mturk.com/dashboard*
// @include https://worker.mturk.com/tasks*
// @include https://worker.mturk.com/projects*
@cuylerstuwe
cuylerstuwe / tmux-cheatsheet.markdown
Created January 23, 2019 22:22 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@cuylerstuwe
cuylerstuwe / karabiner.json
Created January 17, 2019 20:38 — forked from PerpetualBeta/karabiner.json
Karabiner Configuration File
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {