This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: Boxstarter Script | |
# Author: Jess Frazelle <[email protected]> | |
# Last Updated: 2017-09-11 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Change to the directory of the specified Go package name. | |
# | |
gg() { | |
paths=($(g "$@")) | |
path_index=0 | |
if [ ${#paths[@]} -gt 1 ]; then | |
c=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GOSRC="$GOPATH/src/" | |
CURPATH=`pwd` | |
if [ -z "$GOPATH" ]; then | |
echo "Need to set GOPATH" | |
exit 1 | |
fi | |
if ! [[ $GOPATH == */ ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// junkterm is a quick and dirty serial terminal. | |
package main | |
import ( | |
"io" | |
"log" | |
"os" | |
"github.com/pkg/term" | |
"github.com/spf13/cobra" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install all the Go tools and godep tool | |
# Location of gobin is based on installation by OS X Homebrew | |
sudo -u admin GOPATH=/tmp GOBIN=/usr/local/opt/go/bin go get -u golang.org/x/tools/cmd/... | |
sudo -u admin GOPATH=/tmp GOBIN=/usr/local/opt/go/bin go get -u github.com/tools/godep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type Animal struct { | |
Name string | |
mean bool | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
jServletFileUpload = createObject("java","org.apache.commons.fileupload.servlet.ServletFileUpload"); | |
jStreams = createObject("java","org.apache.commons.fileupload.util.Streams"); | |
jByteArrayOutputStream = createObject("java","java.io.ByteArrayOutputStream"); | |
function getFormItems() { | |
//var out = getPageContext().getResponse().getWriter(); | |
var htRequest = getPageContext().getRequest(); | |
var bao = jByteArrayOutputStream.init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set HOSTNAME= | |
set USERNAME= | |
SET SQLPASSWORD= | |
SET FILENAME= | |
SET BACKUPPATH=D:\Dev\SQL Server 2005 Express\datafiles\backup | |
SET BACKUPSQLSCRIPT=%BACKUPPATH%\dbbackup.sql | |
:: execute backup SQL script | |
sqlcmd -S %HOSTNAME% -U %USERNAME% -P %SQLPASSWORD% -i "%BACKUPSQLSCRIPT%" | |
::7zip the bastard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git init - navigate to the appropriate directory and just type that. | |
git add . - adds everything in that path | |
git commit -m 'stuff' - Commits with the message 'stuff' | |
git branch - views branches | |
git checkout -b <new branch> - Creates & switches to new branch | |
git checkout <branch> - switches to branch | |
git merge <branch> - merges that branch to the existing branch that you're already in. | |
git branch -d <branch> - deletes branch | |
git push - This assumes you already have a remote setup (like github) |