Skip to content

Instantly share code, notes, and snippets.

View robinweston's full-sized avatar

Robin Weston robinweston

View GitHub Profile
@robinweston
robinweston / template.sh
Created October 31, 2022 09:37
Bash script template
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
https://tickets.edfringe.com/solr/select?fq=category%3AComedy&fq=dates%3A%5B2018-8-22T5%3A0%3A00Z%20TO%202018-8-26T5%3A0%3A00Z%5D&q=*%3A*&facet=true&fl=sf_meta_id%2Cname%2Cgroup_name&f.subcategories.facet.limit=10000&json.nl=map&sort=name_sort_s%20asc&defType=edismax&start=0&wt=json&rows=1000
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
"Action": [
"iam:ListAccountAliases",
"iam:ListUsers"
],
#!/bin/sh
# To run...
# curl https://gist.githubusercontent.com/robinweston/9d08e343d7306cd69e2abfa9e1d63fc1/raw/763c2ae5874571d02c8d567762b1c7e894ccc352/setup_mac.sh | bash
echo "Starting bootstrapping"
function reload_shell()
{
echo "Reloading shell"
var request = require('superagent');
var wrap = require('superagent-promise');
var agent = wrap(request, Promise);
function makeRequestAsPromise(req) {
return new Promise(function (accept, reject) {
req.end(function (err, response) {
if (err) {
err.response = response;
reject(err);
(ns tile-contains-tests
(:require [midje.sweet :refer :all]))
(defrecord Tile [insect color])
(facts
(fact "contains works with top level maps and records"
(let [record-vec [(Tile. :ant :white)]]
record-vec => (contains {:insect :ant :color :white})))
@robinweston
robinweston / Program.cs
Created June 19, 2014 17:35
Script to copy iTunes ratings from XML into database
using System;
using System.Collections.Generic;
using System.Linq;
namespace ITunesRatings
{
using System.Xml.Linq;
using iTunesLib;
@robinweston
robinweston / Boxstarter.txt
Last active April 4, 2017 19:47
My dev Boxstarter script
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
cinst fiddler4
cinst poshgit
cinst visualstudio2015community
cinst googlechrome
cinst adobereader
cinst Console2
cinst filezilla
cinst visualstudiocode