Skip to content

Instantly share code, notes, and snippets.

View lilmuckers's full-sized avatar

Patrick McKinley lilmuckers

View GitHub Profile
@lilmuckers
lilmuckers / builder.lua
Last active December 1, 2020 14:23
Compact Claustrophobia - Simplified robot builder lib for the shrrinking projector field
-- This was written for shrinking field automation in Compact Claustrophobia modpack
-- This modpack has disabled the navigation upgrade, so navigation is done relative
-- to the starting point, and waypoints are handled with keyed in
-- Starting point is x,y,z - 0,0,0
-- This does not use the minecraft coordinate paradigm because i don't find that intuitive
-- and it kept tripping me up when writing the code.
-- therefore - relative the robots starting position:
-- X -> +ve forward, -ve backwards
@lilmuckers
lilmuckers / README.md
Last active September 3, 2019 14:13
AWS S3 bucket region move

AWS S3 Bucket Region Migration

This is a simple script to "automate" the migration of a bucket between regions on AWS.

The way that AWS is built makes it annoyingly difficult to move an S3 bucket between regions. This is often nessecary if you have a case where a AWS service that reads from S3 isn't available in the region you have your data - so moving the bucket is the best way to ensure that the service can access the data quickly and without additinoal S3 costs.

This is only really an issue on data heavy applications like EMR, Athena, Sagemaker, Quicksight, and suchlike.

This tool was written very quickly so i didn't have to babysit the process overnight, and could verify the results in the morning after the job had completed.

Keybase proof

I hereby claim:

  • I am lilmuckers on github.
  • I am lilmuckers (https://keybase.io/lilmuckers) on keybase.
  • I have a public key ASB2se3WybHe3b5IXyXErglyCI-MGBADOW3pktH3LScdhAo

To claim this, I am signing this object:

@lilmuckers
lilmuckers / pope_song.txt
Created December 1, 2016 16:38
The Pope Song
Fuck the mother fucker, Fuck the mother fucker, Fuck the mother fucker He's a fucking mother fucker, , Fuck the mother fucker, Fuck the fucking fucker, Fuck the mother fucker He's a total fucking fucker, , Fuck the mother fucker, Fuck the mother fucker, Fuck the mother fucker Fucking fuck the mother fucker, , Fuck the mother fucker, Fuck the mother fucking Pope., , Fuck the mother fucker, And fuck you mother fucker, If you think that mother fucker is sacred, If you cover for another mother fucker Who's a kiddie fucker Fuck you you're no better Than the mother fucking rapist, , And if you don't like the swearing That this mother fucker forced from me And reckon it shows moral Or intellectual paucity, Then fuck you mother fucker This is language one employs, When one is fucking cross About fuckers fucking boys, , I don't give a fuck if calling The Pope a mother fucker Means you unthinkingly brand me An unthinking apostate, , This has nowt to do with other Fucking Godly mother fuckers I'm not interested right no
@lilmuckers
lilmuckers / deploy.sh
Last active April 11, 2016 12:33
A "simple" node.js deployment script - runs npm install, bower install, and gulp build, before starting using a forever config file. Will report the status of the deployment back to slack, as well as posting errors where appropriate.
#!/bin/bash
###### Deploy Vars ######
# The deployment root path
DEPLOYROOT=/home/node/deploy/
FOREVERCONFIG=./forever.json
CURLCHECKURL=http://localhost/
BITBUCKET=https://bitbucket.org/user/repo
MAINURL=http://webhost.com/
@lilmuckers
lilmuckers / xbl.js
Created June 26, 2013 21:04
CasperJS script to pull Xbox LIve data
//spawn the casper process
var casper = require("casper").create();
var sourceString = '';
//get the URL
if(casper.cli.has(0)){
var url = casper.cli.get(0)
} else {
casper
@lilmuckers
lilmuckers / slugify.js
Last active September 25, 2017 08:38
Javascript Slugify function.
String.prototype.slugify = function()
{
var p = ['.', '=', '-'];
var s = '-';
//now we need to do some fiddling with special characters
var replaceArray = {
'a': /à|á|å|â/,
'e': /è|é|ê|ẽ|ë/,
'i': /ì|í|î/,
@lilmuckers
lilmuckers / error.js
Created April 11, 2013 11:50
Error handler that uses the github API to create an issue as a way of logging the error. This depends on the githubber npm library.
//set up the object with the api details
function GitHubError(api, owner, repo)
{
this.api = api
this.repo = {
owner: owner,
repo: repo
}
}
@lilmuckers
lilmuckers / oauth.js
Last active December 15, 2015 22:09
A browser based javascript app to get an oauth access_token from GitHub via the webpage, with added google analytics.
jQuery(function($){
//github API url
var ghUrl = 'https://api.github.com/authorizations'
//the form - the response is in a form because... reasons...
var form = $('#ghAuthApi')
var responseForm = $('#ghAuthApiResponse')
//a function to do our field mapping
@lilmuckers
lilmuckers / github.js
Last active December 15, 2015 22:09
GitHub authorisations API script for Flatiron.js, using Githubber library, and uses a configured client secret and client token.
var GitHub = require('githubber');
//run the function
var github = module.exports = function github (cmd, cb) {
//setup the user input schema
var schema = {
properties: {
username: {
pattern: /^[a-zA-Z\s\-]+$/,