Skip to content

Instantly share code, notes, and snippets.

View whatupdave's full-sized avatar

Dave Newman whatupdave

  • Twitter
  • Seattle, WA
View GitHub Profile
@whatupdave
whatupdave / factorio-Dockerfile
Created November 30, 2017 18:15
Some game dockerfiles
FROM frolvlad/alpine-glibc
MAINTAINER Dave Newman dave@partycloud.com
RUN apk --update add bash curl xz
RUN addgroup -S -g 1000 game && \
adduser -H -S -u 1000 game && \
mkdir /data && \
chown game:game /data
$ docker inspect k8s_prometheus-to-sd-exporter_fluentd-gcp-v2.0-d70xs_kube-system_8255735e-6e63-11e7-afdf-42010a800041_0
[
{
"Id": "46252c21f91c33521ed747828f4db244155a7cf018ca43116c3bfcc7302dad60",
"Created": "2017-07-21T22:25:39.01398793Z",
"Path": "/monitor",
"Args": [
"--component=fluentd",
"--stackdriver-prefix=container.googleapis.com/internal/addons",
"--whitelisted-metrics=logging_line_count,logging_entry_count"
$ docker inspect k8s_prometheus-to-sd-exporter_fluentd-gcp-v2.0-d70xs_kube-system_8255735e-6e63-11e7-afdf-42010a800041_0
[
{
"Id": "46252c21f91c33521ed747828f4db244155a7cf018ca43116c3bfcc7302dad60",
"Created": "2017-07-21T22:25:39.01398793Z",
"Path": "/monitor",
"Args": [
"--component=fluentd",
"--stackdriver-prefix=container.googleapis.com/internal/addons",
"--whitelisted-metrics=logging_line_count,logging_entry_count"
@whatupdave
whatupdave / connectToStores.js
Last active August 29, 2015 14:21
connectToStores
import React from 'react'
export default function connectToStores(...stores) {
return function(Component) {
return class StoreConnection extends React.Component {
constructor(props) {
super(props)
this.state = Component.getPropsFromStores()
this.handleStoresChanged = this.handleStoresChanged.bind(this)
}
@whatupdave
whatupdave / json_pq_error.go
Last active August 29, 2015 14:02
JSON load failed with lib/pq
package main
import (
"database/sql"
"encoding/json"
"fmt"
_ "github.com/lib/pq"
)
@whatupdave
whatupdave / readraptor-grabs.coffee
Created April 23, 2014 17:24
Read Raptor screenshot grabs with casperjs
casper = require("casper").create()
root = "http://0.0.0.0:5000"
pages = [{
delay: 5000,
name: "home"
path: "/"
}, {
name: "account"
path: "/confirm/4d178542b72dc85dacf43fc19c2b9041b02fe0eb"
}, {
@whatupdave
whatupdave / heroku_go_fail.sh
Created February 22, 2014 21:47
Failed Heroku Go deploy
-----> Fetching custom git buildpack... done
-----> Go app detected
-----> Installing go1.2... done
-----> Running: godep go install -tags heroku ./...
lib/account_handlers.go:10:2: cannot find package "github.com/codegangsta/martini" in any of:
/app/tmp/cache/go1.2/go/src/pkg/github.com/codegangsta/martini (from $GOROOT)
/tmp/build_51524be4-fbbf-40c6-a80b-757320129dfb/.heroku/g/src/github.com/asm-products/readraptor/Godeps/_workspace/src/github.com/codegangsta/martini (from $GOPATH)
/tmp/build_51524be4-fbbf-40c6-a80b-757320129dfb/.heroku/g/src/github.com/codegangsta/martini
lib/account.go:9:2: cannot find package "github.com/coopernurse/gorp" in any of:
/app/tmp/cache/go1.2/go/src/pkg/github.com/coopernurse/gorp (from $GOROOT)
## Getting Started
1. Sign up at Assembly ([https://assemblymade.com](https://assemblymade.com))
2. Create a Task for the work
3. Create your feature branch (`git checkout -b my-new-feature`)
4. Commit your changes, you can reference the task number (`git commit -am 'Add some feature for #123'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create new Pull Request
@whatupdave
whatupdave / kill-all.rb
Last active December 27, 2015 06:59
Delete all your s3 buckets with lifecycle rules. USE WITH CAUTION HOLY SHIT
#!/usr/bin/env ruby
require 'rubygems'
require 'fog'
# create a connection
connection = Fog::Storage.new({
:provider => 'AWS',
:aws_access_key_id => ENV['AWS_ACCESS_KEY'],
:aws_secret_access_key => ENV['AWS_SECRET_KEY']
@whatupdave
whatupdave / issues.rb
Created August 29, 2013 23:55
Download github issues to json
require 'octokit'
require 'json'
# AUTH=user:pwd ruby issues.rb rails/rails
login, pwd = (ENV['AUTH'] || ':').split(':')
repo = ARGV.shift
client = Octokit::Client.new(:login => login, :password => pwd)