Skip to content

Instantly share code, notes, and snippets.

View MitMaro's full-sized avatar
🦀
Rewritten in Rust

Tim Oram MitMaro

🦀
Rewritten in Rust
View GitHub Profile
@MitMaro
MitMaro / index.php
Last active May 7, 2018 20:57
Redirect to Winsome Way
<?php
$host = "https://share.delorme.com/feed/share/winsomeway";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$result = curl_exec($ch);
curl_close($ch);
@MitMaro
MitMaro / .gitignore
Last active March 26, 2018 18:38
feathers-subapp-context-lost
node_modules/
@MitMaro
MitMaro / README.md
Last active February 9, 2018 16:37
FeatherJS Express Error Hook Issue

Instructions

npm install
node index

In another terminal:

@MitMaro
MitMaro / fizzbuzz.js
Last active September 22, 2017 16:16
FizzBuzz constructor fun
'use strict';
Array.from(Array(100)).map((_, i) => {
return (new (class FizzBuzzSolver extends (
(index) => {
if (index % 3 && index % 5) {
return class Index {constructor() {this.value = index}};
}
else if (!(index % 3 || index % 5)) {
return class FizzBuzz{constructor() {this.value = 'FizzBuzz'}};

Create a directory ~/.git-hooks/ and copy the commit-msg file into the directory.

Run: git config --global core.hooksPath /Users/<username>/.git-hooks/

You will need to copy the commit-msg file into .git/hooks/ of any existing repository.

All new repositories will automatically get the hook.

@MitMaro
MitMaro / git-rebase-todo
Created January 28, 2017 23:34
Git Rebase Sample
pick 193d92c Added package.json file
pick dc522ec Added tests
edit 0b1bb2d Added initial README
edit 2714f59 Lets pretend that didn't happen. Okay?
edit 022c3ce Added JSDocs
fixup 2d67645 Bump to version 0.0.2
fixup 02d4ffa Added eslint and jscs
fixup 5ec43c0 Added editor config
squash 862117c docs
squash 8df34b6 Fixed copy paste error in README
@MitMaro
MitMaro / parse.py
Created January 25, 2017 02:31
BOM parsing and writing
import csv
connectors = {}
REF = 0
FOOTPRINT = 1
LABEL = 2
lines = []
with open('my-bom.bom', newline='') as f:
reader = csv.reader(f, delimiter=';')
@MitMaro
MitMaro / BitBucketCustomStyles.js
Last active January 24, 2017 20:07
Custom styles for BitBucket and Tampermonkey
// ==UserScript==
// @name BitBucket Style Updates
// @namespace http://mitmaro.ca
// @version 1.0.0
// @description Converts the diff tab size on BB
// @author Tim Oram
// @match https://bitbucket.org/*
// @grant none
// ==/UserScript==
@MitMaro
MitMaro / base.sh
Last active November 8, 2016 15:05
#!/bin/bash
Say -v Bahh "In A.D. 2101. War was beginning.";
Say -v Alex "What happen?";
Say -v Fred "Somebody set up us the bomb.";
Say -v Bruce "We get signal.";
Say -v Alex "What!";
Say -v Bruce "Main screen turn on.";
Say -v Alex "It's you!";
Say -v Zarvox "How are you gentlemen!";
Say -v Zarvox "All your base are belong to us.";
@MitMaro
MitMaro / hosts
Last active October 23, 2016 07:53
Hosts file
151.101.129.69 stackoverflow.com
# 151.101.1.69 stackoverflow.com
# 151.101.193.69 stackoverflow.com
# 151.101.65.69 stackoverflow.com
192.229.173.16 abs.twimg.com
#api.heroku.com
#api.metrics.herokai.com
#assets-cdn.github.com
#avatars0.githubusercontent.com