Skip to content

Instantly share code, notes, and snippets.

View mkelley33's full-sized avatar
🎯
Focusing

Michaux Kelley mkelley33

🎯
Focusing
View GitHub Profile
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@mkelley33
mkelley33 / osx_install.sh
Last active August 29, 2015 14:25 — forked from t-io/osx_install.sh
Homebrew: brew cask and brew installs of apps common to my dev machine
#!/bin/sh
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew tap homebrew/dupes
brew install wget
brew install postgresql
brew install mongodb
brew install mongoose
@mkelley33
mkelley33 / webpack.config.js
Created November 20, 2016 00:42
webpack-dashboard config
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
// add
const Dashboard = require('webpack-dashboard');
const DashboardPlugin = require('webpack-dashboard/plugin');
const dashboard = new Dashboard();
// add
@mkelley33
mkelley33 / simple-pagination.js
Created February 9, 2024 23:39 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@mkelley33
mkelley33 / gist:eb1549dddb65672a0724c2a91bd873fc
Created February 25, 2024 21:53
zsh script to replace all spaces and special characters in a file name for all files in the directory with dashes and make all letters lowercase removing the last dash in the file name
#!/bin/zsh
# Iterate over files in the directory
for filename in *; do
# Check if the filename is a regular file
if [[ -f "$filename" ]]; then
# Extract filename and extension
base_filename=$(basename "$filename")
extension="${base_filename##*.}"
base_filename="${base_filename%.*}"