Skip to content

Instantly share code, notes, and snippets.

View shano's full-sized avatar

Shane Dowling shano

View GitHub Profile
@shano
shano / rewrite_roam.py
Created May 24, 2020 23:58
Hacky Script to convert Roam Research Export to VimWiki Zettle
import os
basepath = 'roam_export/'
bad_entries = []
start = '[['
end = ']]'
for entry in os.listdir(basepath):
new_file_content=''
full_file = os.path.join(basepath, entry)
if os.path.isfile(full_file):
@shano
shano / functions.test.js
Last active February 15, 2019 09:29
Mocking Serverless
const { MongoClient } = require('mongodb');
const { User } = require('models');
const { functionA, functionB } = require('../lib/lambdafunctions');
let connection;
const AWS = require('aws-sdk');
const AWSMock = require('aws-sdk-mock');
const sinon = require('sinon');
@shano
shano / nginx.conf
Created August 20, 2018 18:42
Nginx maintenance configuration
#### /etc/nginx/nginx.conf
map $remote_addr $internal {
default 0;
127.0.0.1 1; # For local connections
some.other.ip 1; # Internal IP 1
and.another.ip 1; # Internal IP 2
and.another.ip 1; # Internal IP 3
}
Verifying that "randoming.id" is my Blockstack ID. https://onename.com/randoming

Keybase proof

I hereby claim:

  • I am shano on github.
  • I am shano (https://keybase.io/shano) on keybase.
  • I have a public key ASCQeiq5ZikrKEDcZMXU1Wz2OInr-jLDRosGGsXtONLEowo

To claim this, I am signing this object:

@shano
shano / md2mb.py
Last active August 29, 2015 13:56
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Shane Dowling, 8 Feb 2013
Frédéric Grosshans, 19 January 2012
Nathan R. Yergler, 6 June 2010
This file does not contain sufficient creative expression to invoke
assertion of copyright. No warranty is expressed or implied; use at
your own risk.
@shano
shano / anon
Created September 22, 2013 14:37
Quick script that allows you to obscure your network device before connecting to a network.
#!/bin/bash
# Anonymise your machines internet connection
# REQUIRES: macchanger, wicd and john the rippers password list
# Settings
INTERFACE=wlan1
HOSTS_FILE="/etc/hosts"
START_TOKEN="## start-anon"
END_TOKEN="## end-anon"