Skip to content

Instantly share code, notes, and snippets.

View squeedee's full-sized avatar
🚛
Supply Chain Specialist

Rasheed Abdul-Aziz squeedee

🚛
Supply Chain Specialist
View GitHub Profile
@squeedee
squeedee / README.md
Last active September 29, 2015 14:29
Logging to Logentries from powershell

Simple debug output for automated windows deploys.

  • Use Logentries to create a manual Token TCP log set.
  • Change $token to match your new log
  • Put the function at the top of your PS script
  • Call $le.Log() any time you need output.
  • Use the log entries Live Tail feature. It's not always immediate, give it up to a couple of minutes for your entries to appear.
  • Until there is some logging in your log set, it may take even longer to see your first log entry. Prime the log if you can, by outputting something to it immediately. Run the script with the included Hello! to start this process.

Funk Declaration - incomplete

Goal

  • To create a directed graph of all dependencies and dependent elements in Go Lang Projects
  • To present this graph in Structure 101, a great tool for finding dependency hell.

Successes

  • Found the func!
  • Traversed the Syntax tree of Golang to find declaration elements
  • Parsed all the packages in a Golang package spec. (such as ./...)
  • Discovered the best structure for visualising dependency nesting in GoLang
@squeedee
squeedee / on.md
Last active August 29, 2015 14:27
  • In gocd repo
./scripts/jump
  • target concourse bosh
bosh target 10.0.52.6
@squeedee
squeedee / naming.md
Created August 10, 2015 16:47
Short list of idioms in Go Lang

Packages

  • Lowercase
  • No camels
  • No underscores
  • One word
package aws
package compute
package command
@squeedee
squeedee / Structure.Markdown
Last active August 29, 2015 14:27
How I might describe the nested aspect of a Golang program
  • [D] github.com
    • [D] squeedee
      • [D] flavor
        • [D] parser
          • [P] parser
            • [S] ParserContext
            • [I] Parser
            • [I] Parsable
          • [P] parser_ext
  • [I] ExtendableParser
@squeedee
squeedee / manifest.yml
Created July 30, 2015 19:35
Candied Yaml doesn't support merge.
---
services:
- acceptance-db
env:
RAILS_ENV: acceptance
application-types:
web: &WEB
mem: 2G
disk: 2G
@squeedee
squeedee / env.sh
Created July 30, 2015 15:17
Demonstrating progrmattic assigns to env vars in a script that can be sourced.
#!/bin/bash
VARNAMES=(FRED BOB)
VARVALS=('foo' 'bar')
index=0;
for name in ${VARNAMES[@]}; do
echo $index
@squeedee
squeedee / gist:13b3fb803a41f547967d
Created February 23, 2015 15:22
Git credentials delete
git credential-cache exit
open https://help.github.com/articles/updating-credentials-from-the-osx-keychain/
(ns mapper.util.diff
(:require [mapper.util :refer :all]
[mapper.core :refer :all]))
(defn diff [[width height] map-a map-b]
"A utility for testing map equality. Compares map-a and map-b elementwise and returns true if they're the same.
E.g.: diff [2 2] '(:a :b :c :d) '(:a :b :c :z) => '(true true true false)"
(let [map-a-coll (map-as-list [width height] map-a)
map-b-coll (map-as-list [width height] map-b)]
(map = map-a-coll map-b-coll)))