Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

  • Milwaukee, WI
View GitHub Profile
@mcandre
mcandre / windows-which-where.md
Last active July 1, 2016 22:58
Windows equivalent to Unix which

Unix: which <program>

Windows: where.exe <program>

The .exe requirement is due to where being a token of the PowerShell language

@mcandre
mcandre / windows-get-home-directory.md
Created July 1, 2016 22:50
windows get home directory

How to retrieve the current user's home directory from either Command Prompt or PowerShell:

C:\> cmd /c "echo %homedrive%%homepath%"
C:\Users\andrew

PS C:\> cmd /c "echo %homedrive%%homepath%"
C:\Users\andrew
@mcandre
mcandre / windows-get-PATH-environment-variable.md
Created July 1, 2016 23:08
windows how to get PATH env var
PS C:\> echo $Env:Path
@mcandre
mcandre / powershell-update-environment-variable-cache.md
Created July 1, 2016 23:18
PowerShell How to Update PATH and other environment variable caches
  1. Log out.
  2. Log in.
@mcandre
mcandre / windows-melpa-https-error.md
Created July 1, 2016 23:31
MELPA HTTPS error (Windows)

.emacs:

(require 'package)
(setq package-archives
      '(("melpa" . "https://melpa.org/packages/")
        ("marmalade" . "https://marmalade-repo.org/packages/")
        ("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)

GitHub-flavored Markdown does not use C-style escapes for escaping backticks inside spans. Instead, GFM uses double, significant whitespaced, backticks.

Two backticks, then a space, then a backtick, then a space, then two more backticks:

`` ` ``

produces:

@mcandre
mcandre / windows-curl.md
Last active August 5, 2016 01:20
How to curl webpages

Installation

PS admin C:\> choco install curl

Usage

Use curl.exe, as curl is a PowerShell token.

@timotgl
timotgl / uninstall-razer-synapse.sh
Last active April 16, 2025 13:33
How to fully uninstall Razer Synapse 2 on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) without using Razer's official uninstall tool
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 )
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra)
# without using Razer's official uninstall tool.
# Tested on OS X 10.11.5 in July 2016.
# Edited with additional steps for later OS X versions,
# contributed by commenters on this gist.
# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater
@mcandre
mcandre / gopath-setup-easy-mode.md
Last active February 9, 2022 07:23
$GOPATH Setup: Easy Mode

$GOPATH Setup: Easy Mode

$ mkdir -p ~/go
$ echo 'export GOPATH="$HOME/go"' >> ~/.bash_profile
$ echo 'export PATH="$GOPATH/bin:$PATH"' >> ~/.bash_profile
$ source ~/.bash_profile

Usage