Skip to content

Instantly share code, notes, and snippets.

Joseph Spurrier josephspurrier

Block or report user

Report or block josephspurrier

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@josephspurrier
josephspurrier / html.json
Created Jun 18, 2017
Visual Studio User Snippets
View html.json
{
/*
// Place your snippets for HTML here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
@josephspurrier
josephspurrier / keybindings.json
Last active Nov 17, 2019
Visual Studio Code Settings
View keybindings.json
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+home", "command": "cursorTop",
"when": "editorTextFocus" },
{ "key": "ctrl+end", "command": "cursorBottom",
"when": "editorTextFocus" }
]
View Microsoft.PowerShell_profile.ps1
# Store this document in the following location:
# C:\Users\username\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
# You'll have to enabled remote execution first (run as admin): Set-ExecutionPolicy RemoteSigned
# Gist: https://gist.github.com/josephspurrier/636c4226af85970c6f647d35ea1b1be5
# This profile makes it easy to set your GOPATH and modify your PATH environment
# variables easily when switching between Visual Studio workspaces.
# Add the gotools to the path.
$env:Path += "C:\Users\"+$env:username+"\Documents\gotools\bin;"
@josephspurrier
josephspurrier / webserver.go
Created Mar 21, 2017
Simple Web Server in Go
View webserver.go
package main
import (
"io"
"net/http"
)
func main() {
http.HandleFunc("/", index)
http.ListenAndServe(":8080", nil)
View linux.sh
# Download Go (use any of the latest versions)
curl -O https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz
# Extract Go
tar -xvf go*.tar.gz
# Install Go
sudo mv go /usr/local
# Create a workspace folder
@josephspurrier
josephspurrier / etc-init.d-hello-world
Last active Feb 22, 2020
/etc/init.d Script for Go Application
View etc-init.d-hello-world
#!/bin/bash
#
# chkconfig: 35 95 05
# description: Hello world application.
# Run at startup: sudo chkconfig hello-world on
# Load functions from library
. /etc/init.d/functions
View index.html
<form>
<div style="width: 400px; margin: 0 auto; text-align: center; padding-top: 100px;">
<h1>
<span style="color: blue;">G</span>
<span style="color: red;">o</span>
<span style="color: yellow;">o</span>
<span style="color: blue;">g</span>
<span style="color: green;">l</span>
<span style="color: red;">e</span>
</h1>
@josephspurrier
josephspurrier / .bash_profile
Last active Nov 17, 2019
macOS Bash Profile
View .bash_profile
#################################################################################
#
# Bash Configurations and Aliases for OS X
#
# Latest: https://gist.github.com/josephspurrier/acf7327726df6587a56ff2c2062314fa
# This was modified so it can be included in your ~/.zshrc file with the command:
# source ~/.bash_profile
#
# It's recommended to use oh-my-zsh:
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
View keybase.md

Keybase proof

I hereby claim:

  • I am josephspurrier on github.
  • I am josephspurrier (https://keybase.io/josephspurrier) on keybase.
  • I have a public key whose fingerprint is 3FC8 C7DA FEAD 9308 EC4D 1129 313E F9D9 CED7 C310

To claim this, I am signing this object:

@josephspurrier
josephspurrier / http_test.go
Created Jul 6, 2016
Test POST Request in Go
View http_test.go
package main
import (
"log"
"net/http"
"net/http/httptest"
"net/url"
"strings"
)
You can’t perform that action at this time.