Skip to content

Instantly share code, notes, and snippets.

View mercul3s's full-sized avatar
🐓
Code Farming

Mercedes Coyle mercul3s

🐓
Code Farming
View GitHub Profile
@mercul3s
mercul3s / intro-go.md
Last active May 9, 2019 14:43
Outline for a go intro talk/workshop

Outline

  • What is Go?
    • compiled, statically typed, non object-oriented language
    • C-like structure
    • Native support for handling concurrency and threads (via goroutines)
  • Basic structure of a go program
    • Package naming
      • packages live in a subdirectory of the same name with their test files
      • generally do not contain main methods, but they can
  • Main file/method
@mercul3s
mercul3s / function-deployment.yaml
Created March 12, 2019 20:56
Template of a function deployment with a toleration
# Source: templates/deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: canary-deployment
namespace: openfaas-fn
labels:
app: openfaas-fn
helm.sh/chart: renderer-0.1.0
app.kubernetes.io/instance: renderer-canary
@mercul3s
mercul3s / function.yml
Created March 12, 2019 20:51
example function yaml with taints
---
apiVersion: openfaas.com/v1alpha2
kind: Function
metadata:
name: example-function
namespace: openfaas-fn
spec:
name: renderer
image: example-image:latest
environment:
@mercul3s
mercul3s / interview_questions.md
Last active April 11, 2019 16:36
Interview questions to ask

Team Culture, Work, and Process

  • What does your day to day look like?
  • How does pairing work on your team?
    • Do you usually work solo or is there a lot of pairing?
  • Who decides what to work on? How is work divided up?
  • What kinds of projects are your team responsible for?
  • How do code reviews work on your team?
  • Tell me something you love about working here.
  • Tell me something you don't love about working here.
  • Who is the ideal person for this role?
@mercul3s
mercul3s / appveyor_build_log
Created May 16, 2018 17:59
appveyor build failure
[00:00:00] Build started
[00:00:00] git clone -q git@github.com:sensu/sensu-go.git c:\gopath\src\github.com\sensu\sensu-go
[00:00:41] git fetch -q origin +refs/pull/1546/merge:
[00:00:42] git checkout -qf FETCH_HEAD
[00:00:42] Running Install scripts
[00:00:42] rmdir c:\go /s /q
[00:00:42] appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-%GOARCH%.msi
[00:00:46]
[00:00:46] Downloading go1.10.windows-386.msi (100,265,984 bytes)...1%
[00:00:46] Downloading go1.10.windows-386.msi (100,265,984 bytes)...10%
@mercul3s
mercul3s / travis_build_log
Created May 16, 2018 17:59
travis ci build failure
ok github.com/sensu/sensu-go/backend/pipelined 0.030s
time="2018-05-16T17:14:52Z" level=info msg="listening for peers on " component=etcd pkg=embed
time="2018-05-16T17:14:52Z" level=info msg="http://127.0.0.1:40271" component=etcd pkg=embed
time="2018-05-16T17:14:52Z" level=info msg="listening for client requests on " component=etcd pkg=embed
time="2018-05-16T17:14:52Z" level=info msg="127.0.0.1:35925" component=etcd pkg=embed
time="2018-05-16T17:14:52Z" level=info msg="listening for peers on " component=etcd pkg=embed
time="2018-05-16T17:14:52Z" level=info msg="http://127.0.0.1:39894" component=etcd pkg=embed
time="2018-05-16T17:14:52Z" level=info msg="listening for client requests on " component=etcd pkg=embed
time="2018-05-16T17:14:52Z" level=info msg="127.0.0.1:38802" component=etcd pkg=embed
time="2018-05-16T17:14:52Z" level=info msg="name = default" component=etcd pkg=etcdserver
@mercul3s
mercul3s / unique-list.go
Last active October 30, 2017 23:06
Determining unique values in a slice or array in Go requires the use of a map.
package main
import (
"fmt"
)
func appendUnique(list []string) []string {
// initialize a map of string keys and boolean values for
// keeping track of list entries we've seen.
uniqueKeys := make(map[string]bool)
@mercul3s
mercul3s / com.mercmotivator.cron.plist
Created March 15, 2016 20:44
plist for exercise.sh
<!--
To use this plist file, edit the string (name), and save it to ~/Library/LaunchAgents.
Make sure the file is owned by root. To start the plist, enter the following commands:
sudo launchctl load com.mercmotivator.cron.plist
And you're done! The plist will now run autmatically every 30 minutes, unless you decide
to change the time interval.
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@mercul3s
mercul3s / exercise.sh
Last active April 18, 2016 17:22
Motivator for exercise in my day
#!/bin/bash
# Pick a random mac voice out of the list below, and then pick a random action to say.
voices=(
Alex
Bells
Bruce
Cellos
Daniel
Fiona
@mercul3s
mercul3s / Phant_Ethernet.ino
Created December 6, 2015 23:28
Sparkfun Ethernet Example
/*****************************************************************
Phant_Ethernet.ino
Post data to SparkFun's data stream server system (phant) using
an Arduino and an Ethernet Shield.
Jim Lindblom @ SparkFun Electronics
Original Creation Date: July 3, 2014
This sketch uses an Arduino Uno to POST sensor readings to
SparkFun's data logging streams (http://data.sparkfun.com). A post
will be initiated whenever pin 3 is connected to ground.