Skip to content

Instantly share code, notes, and snippets.

View navicore's full-sized avatar

Ed Sweeney navicore

View GitHub Profile
{
"_version": "4.0",
"metadata": [
{
"name": "\"id\"",
"value": "\"0-000-2\","
},
{
"name": "\"model\"",
"value": "\"Mastrena II\","
@navicore
navicore / facts.lua
Created October 12, 2016 01:47 — forked from randrews/facts.lua
Make Lua look like Prolog!
----------------------------------------------------------------------------------------------------
--- Making Lua look like Prolog:
---
--- Let's use metatables for something other than emulating prototype-based OO. By making the
--- __index metamethod create values for undefined things, we can make Lua look like Prolog!
--- We create empty tables for anything starting with a capital letter, functions that populate
--- those tables for lowercase things (to assign relationships) and if a name begins with "is_"
--- then it becomes a function that queries those tables.
----------------------------------------------------------------------------------------------------
@navicore
navicore / out.sh
Last active November 12, 2016 15:37
bash eval crashing with parans
#!/usr/bin/env bash
set -e
ATC_HOME="https://some.com/mydir"
#text="say *hiya*"
#text="say *hiya* to [this]"
#text="say *hiya* to [this]\(stuff\)"
text="~say~ *hiya* __to__ [this]\(${ATC_HOME}/stuff\)"
echo "text:: $text"
#!/usr/bin/env bash
set -e
exec 3>&1
exec 1>&2
set -x
ATC_HOME="https://some.com/mydir"
payload=$(mktemp /tmp/resource-in.XXXXXX)
@navicore
navicore / semver_git.md
Created November 12, 2016 16:04
create version branch for semver processing
git checkout --orphan version
git rm --cached -r .
rm -rf *
rm .gitignore .gitmodules
touch README.md
git add .
git commit -m "new branch"
git push origin version
@navicore
navicore / AZ_KUBERNETES.md
Last active March 30, 2017 22:42
azure cli v2 commands for acs kubernetes

AZ and ACS Tool Setup

See this.

  • make sure you have a working go env with a GO_PATH

  • cd ~/go/src and git clone [email protected]:Azure/acs-engine.git

  • make ci and deal with a bunch of dep hiccups

@navicore
navicore / kube-spark-kafka-cassandra.sh
Last active January 9, 2019 08:45
A set of scripts to deploy Spark standalone, Kafka, and Cassandra in Kubernetes
#!/usr/bin/env bash
#
# presumes you have a working kubernetes cluster and
# healthy local kubectl install and config
#
#
# if you want to customize,
# - comment out the last line
# - edit build/*.yaml files
@navicore
navicore / powershell.md
Last active January 2, 2017 06:14
Install PowerShell on OSX

Install PowerShell on OSX

wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0-alpha.9.pkg

start powershell

Install-Package -Name AzureRM.NetCore.Preview -Source https://www.powershellgallery.com/api/v2 -ProviderName NuGet -ExcludeVersion -Destination /usr/local/share/powershell/Modules
kind: ReplicationController
apiVersion: v1
metadata:
name: jobserver-controller
spec:
replicas: 1
selector:
component: jobserver
template:
metadata:
@navicore
navicore / yarn-cube-howto.md
Last active January 8, 2017 03:51
hdfs on kubernetes notes

https://github.com/Comcast/kube-yarn

uses namespace yarn-cluster

docker run -it --rm -v ${HOME}/.kube/config:/root/.kube/config:ro danisla/kube-yarn:latest                                     

tell my app to write files to hdfs://hdfs-nn.yarn-cluster:9000/oegossip

hdfs shell