Skip to content

Instantly share code, notes, and snippets.

View foxleigh81's full-sized avatar
:octocat:

Alexander Foxleigh foxleigh81

:octocat:
View GitHub Profile
@foxleigh81
foxleigh81 / vmd
Last active October 24, 2019 10:29
DISABLE_AUTO_TITLE="true"
# Commonly used commands for VMD
vmd() {
# don't forget to set this variable to your vmd folder
vmdDir=~/Dev/vmd
# The variable below assumes you're on a .1. subnet, you'll need to change this
# if you are not, otherwise, leave it alone.
ip=$(ifconfig -a | awk '$1 == "inet" {print $2}' | grep 192.168.1.)
# No arguments passed, just go to vmd folder
@foxleigh81
foxleigh81 / wrap.js
Last active January 14, 2019 22:22
Wrap - takes a filename and wraps a directory with the same name (minus extension) around it and renames the file to index.md
#!/usr/bin/env node
// takes a filename and wraps a directory with the same name (minus extension) around it and renames the file to whatever you like
// all output is placed in a directory called 'output' in the directory the script is run in.
var fs = require('fs')
var path = require('path')
const searchRecursive = (dir, pattern) => {
// This is where we store pattern matches of all files inside the directory
@foxleigh81
foxleigh81 / up
Last active December 14, 2018 14:37
Bash script to go up x directories
up() {
if [[ $@ == 1 ]]; then
# Go up one folder (cd ..)
cd ..
elif [[ $@ == 2 ]]; then
# Go up two folders (cd ../..)
cd ../..
elif [[ $@ == 3 ]]; then
# Go up three folders (cd ../../..)
cd ../../..
@foxleigh81
foxleigh81 / unwrap
Last active December 13, 2018 20:20
unwrap bash alias
# Copies the contents of the current directory into the parent
# directory and then deletes the current directory
unwrap() {
THISDIR=`basename $PWD`
if [ -z "$(ls -A)" ]; then
echo "No files to unwrap."
else
cp -r * ../
fi
echo "Removing directory"
@foxleigh81
foxleigh81 / pr-template
Last active October 21, 2020 11:22
A template for a good PR
<!--
Please ensure that you complete the following mandatory sections:
- Issue*
- Overview
- Reason*
- Work carried out
* Only mandatory if working from a issue
-->
@foxleigh81
foxleigh81 / clarity.yml
Last active August 22, 2017 10:25
clarity.json config file
# Author needs to be specified in order to generate accurate documentation
author :
name: "Alex Foxleigh"
giturl : "https://github.com/foxleigh81"
defaults:
# viewType will specify the file extension used for views. Any extension can be used here (ommit the '.'')
viewType : "njk"
# viewType will specify the preprocessor used for styles. At the moment only Stylus (.styl) is supported
styleType: "stylus"
@foxleigh81
foxleigh81 / linktextemmet
Created April 23, 2015 15:53
Emmet snippet for wrapping link text (Really useful for wrapping lots of links quickly)
a[href="http://www.$#"]{$#}
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
# Example aliases
@foxleigh81
foxleigh81 / volcanic.zsh-theme
Created March 2, 2015 23:47
Customised ZSH theme
# vim:ft=zsh ts=2 sw=2 sts=2
# Volcanic Creations theme.
# A modified fork of agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
#
@foxleigh81
foxleigh81 / customYUI2
Last active August 29, 2015 14:13
Modified YUI2 Reset
/* Alex Ward's Custom YUI2 Reset */
* { margin:0;padding:0;box-sizing:border-box;outline: 0; }
table { border-collapse:collapse;border-spacing:0; }
fieldset,img { border:0; }
address,caption,cite,code,dfn,em,strong,th,var { font-style:normal;font-weight:normal;}
ol,ul { list-style:none; }
caption,th { text-align:left; }
h1,h2,h3,h4,h5,h6 { font-size:100%;font-weight:normal;}
q:before,q:after { content:'';}
a { text-decoration:none; }