Skip to content

Instantly share code, notes, and snippets.

View HokieGeek's full-sized avatar
🎄

Andrés Pérez HokieGeek

🎄
View GitHub Profile
@HokieGeek
HokieGeek / amazon-eks-vpc.yaml
Created August 10, 2018 01:13
Nexus IQ Server on AWS EKS reference files
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'EKS VPC for Nexus IQ'
Parameters:
VpcBlock:
Type: String
Default: 192.168.0.0/16
Description: The CIDR range for the VPC. This should be a valid private (RFC 1918) CIDR range.
Ensure the left side is plugged in...Detecting port, reset your controller now.....
Detected controller on port at /dev/ttyACM0. Flashing ./keyboards/nyquist/eeprom-lefthand.eep
+ sudo avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U eeprom:w:./keyboards/nyquist/eeprom-lefthand.eep
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
#!/bin/bash
license=$1
iq_host=${2:-"localhost:8070"}
user_pwd=${3:-"admin:admin123"}
echo "Installing to ${iq_host}"
cookies="cookies"
## Create session
curl --verbose \
@HokieGeek
HokieGeek / git-grep-recursive
Last active May 23, 2017 15:10
Recursive git grep for my old version of git at work
#!/bin/sh
${cmd:="git --no-pager grep "$@}
[ "`readlink --canonicalize $PWD`" == "`git rev-parse --show-toplevel`" ] && \
git submodule --quiet foreach --recursive \
"${cmd} | awk -v path=\$path '{ print path, \$0 }' OFS='/' || :"
@HokieGeek
HokieGeek / goenv.bat
Created December 7, 2016 20:37
go environment in windows
@ECHO OFF
set GOROOT=%cd%\root
set GOBIN=%cd%\bin
set GOPATH=%cd%
set go=%GOROOT%\bin\go.exe
set vi=%cd%\gvim.lnk
set atom=%cd%\atom.lnk
@HokieGeek
HokieGeek / ifttt.sh
Last active December 1, 2017 16:24
IFTTT Maker Channel Bash Script
#!/bin/bash
(( $# <= 0 )) && exit 1
key=REPLACE_ME
read event values <<<$(echo -n "$@" | awk 'NR > 1 { $0=sprintf("\"value%d\":\"%s\",", NR-1, $0) } 1' RS=' ' ORS=' ' | sed 's/, $//')
curl --request POST \
--header 'Content-Type: application/json' \
--data '{'"${values}"'}' \
#!/bin/bash -e
echo ">>>> HOOK <<<<"
refBareRepo=$(pwd)
refname=$1
oldrev=$2
newrev=$3
# echo "ref: $refname"
# echo "old: $oldrev"
#!/usr/bin/awk -f
BEGIN {
vessels["other"]="0"
vessels["french press"]="1"
vessels["yixing"]="2"
vessels["tea-zer tumbler"]="3"
vessels["tea stick"]="4"
vessels["mesh spoon"]="5"
vessels["sauce pan"]="6"
@HokieGeek
HokieGeek / Dockerfile-life
Last active October 6, 2016 10:15
Sets up a dev environment for a small project
FROM golang:latest
RUN mkdir -p /go/src/github.com/hokiegeek && cd /go/src/github.com/hokiegeek && mkdir -p life biologist biologistd
ADD life /go/src/github.com/hokiegeek/life
ADD biologist /go/src/github.com/hokiegeek/biologist
ADD biologistd /go/src/github.com/hokiegeek/biologistd
RUN go install github.com/hokiegeek/biologistd
@HokieGeek
HokieGeek / index.html
Created September 30, 2016 10:58
Trying out angular
<html ng-app="tester">
<head>
<title>Angular testing</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<script>
angular.module('tester', [])
.directive()
// .controller('tctrl', function($scope) {
// $scope.name = "TESTING";