Skip to content

Instantly share code, notes, and snippets.

View duaneleem's full-sized avatar
Converting Coffee to Code, Daily

Duane Leem duaneleem

Converting Coffee to Code, Daily
View GitHub Profile
@duaneleem
duaneleem / gitignore
Last active March 3, 2017 00:17
.gitignore aliases for lazy devs
[alias]
# Pushes to gh-pages then switches back to master
pagespush = "!git add . && git commit -m 'Updated content.' && git push && git checkout gh-pages && git merge master && git push origin gh-pages && git checkout master"
# Update local/remote repo; delete gh-pages; and push dist folder to gh-pages. Great for Angular projects.
distpush = "!git add . && git commit -m 'Updated content.' && git push && git push origin --delete gh-pages && git subtree push --prefix dist origin gh-pages"
@duaneleem
duaneleem / forced-reboot.bat
Last active November 16, 2016 18:41
Forces a Windows PC to reboot automatically.
REM Forces a Windows PC to reboot automatically.
shutdown /r /t 0
@duaneleem
duaneleem / Dockerfile
Last active August 9, 2016 21:04
This build is used for live-reload development purposes (HTML / CSS / JS Stack)
## This build is used for live-reload development purposes. You MUST
## mount a volume back to your working directly upon creation.
FROM ubuntu:16.04
MAINTAINER Duane Leem <duaneleem@alumni.ggu.edu>
## Making a random directory to -v mount the container to later.
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
@duaneleem
duaneleem / .bash_profile
Last active August 9, 2016 01:24
Helper bash functions to automate git workflow. On Mac OS X type "git-all -m "Updated app." and it will git add/commit/push. You can update gh-pages using "git-pages" from bash and will update your gh-pages based on master repo.
# GitHub Automation
gitAll() {
git add .
git commit -m "$1"
git push
}
alias git-all=gitAll
gitPages() {
git checkout gh-pages
@duaneleem
duaneleem / auto-vhdx.bat
Last active December 20, 2018 15:54
This will make a VHDX backup of the drives you specify to an external drive (such as I drive) using Disk2vhd.
:: This batch file uses Disk2vhd to make automated backups of the entire Windows computer.
:: Download Disk2vhd from:
:: https://technet.microsoft.com/en-us/sysinternals/ee656415.aspx?f=255&MSPPError=-2147217396
:: Generate the file name.
$fileName = (get-date -uformat %d%b%y) + "_" `
+ $Env:COMPUTERNAME + ".vhdx"
:: Drive letter to save the VHDX.
$driveLetter = "i:"
var gulp = require('gulp'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
uglify = require('gulp-uglify'),
usemin = require('gulp-usemin'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
concat = require('gulp-concat'),