This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type Loc struct { X, Y int } | |
func (l Loc) Neighbors() []Loc { | |
neighbors := make([]Loc, 0, 8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { google } = require('googleapis'); | |
const config = { | |
auth_scopes: [ | |
'https://www.googleapis.com/auth/drive.activity.readonly', | |
], | |
} | |
async function activity_for({ ancestorName, itemName }) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package matcher_test | |
import ( | |
"fmt" | |
"github.com/golang/mock/gomock" | |
. "github.com/onsi/ginkgo" | |
. "github.com/onsi/gomega" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
/// | |
/// Genderated code: | |
/// | |
type GeneratedQueries interface { | |
A() error | |
B() error | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lambda_handler = require('lambda-handler'); | |
exports.handler = lambda_handler(( event, ctx, done ) => { | |
// This will log a handled error to CloudWatch and return the error to AWS Lambda | |
throw 'BOOM!'; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const { google } = require('googleapis') | |
const http = require('http') | |
const open = require('open') | |
const { promisify } = require('util') | |
const config = { | |
auth_scopes: [ | |
'https://www.googleapis.com/auth/drive.readonly', | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"image" | |
"image/color" | |
_ "image/jpeg" | |
"os" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Heavy Metal Traffic Control (HMTC) | |
# Erik Elmore 2005-06-11 | |
# Based on concepts from WonderShaper | |
### Configuration ### | |
# Set this to your WAN interface | |
INTERFACE=eth0 | |
# Upstream Parameters # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @author Erik Elmore <erik@erikelmore.com> | |
# This is getting a little out of hand... :dizzy_face: | |
# For printing trace output for demonstration | |
module Status | |
def status( method_name, args = [], extra = nil ) | |
extra = ' => %s' % extra if extra | |
puts '%s#%s(%s)%s' % [self.class, method_name, args.join(', '), extra] | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Write paths to keys to autoload in ~/.autoload-ssh-keys | |
env=~/.ssh/agent.env | |
autoload=~/.autoload-ssh-keys | |
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; } | |
agent_start () { |
NewerOlder