Skip to content

Instantly share code, notes, and snippets.

@adeluccar
adeluccar / wp_custom_install.sh
Created March 24, 2017 17:21 — forked from davidwolfpaw/wp_custom_install.sh
A starter script for creating a WordPress site on Vagrant using VVV, VV, VASSH, and WP-CLI
#!/bin/bash -e
# Ideas, Drawbacks, and Suggestions: https://davidlaietta.com/bash-scripting-to-automate-site-builds-with-wp-cli/
# Set up some defaults
wpuser='USERNAME'
email='USER@EMAIL.COM'
blueprint='BLUEPRINT-NAME'
clear
@adeluccar
adeluccar / cask_upgrade.sh
Created February 2, 2017 22:32
Script upgrading outdated brew casks
#!/usr/bin/env bash
(set -x; brew update;)
(set -x; brew cleanup;)
(set -x; brew cask cleanup;)
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
@adeluccar
adeluccar / delete-kindle-highlights.js
Last active June 23, 2016 04:39
Use this javascript in the browser console to delete all kindle highlights
(function () {
var buttons = document.getElementsByName("delete");
var n = buttons.length;
for (var i = 0; i < n; i++) {
console.log("Deleting " + i + " of " + n);
buttons[i].click();
}
})();
@adeluccar
adeluccar / README-Template.md
Created June 4, 2016 19:19 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisities

@adeluccar
adeluccar / gem-reset
Last active August 29, 2015 14:22 — forked from nixpulvis/gem-reset
#!/usr/bin/env ruby
# Remove all gems EXCEPT defaults :)
`gem list -d`.split(/\n\n^(?=\w)/).each do |data|
match = data.match(/(?<name>([^\s]+)) \((?<versions>.*)\)/)
name = match[:name]
versions = match[:versions].split(', ')
if match = data.match(/^.*\(([\d\.]*),? ?default\): .*$/)
next if match[1].empty? # it's the only version if this match is empty
# Credit to http://www.iarp.ca/hobby/computing/36-git-committed-and-pushed-to-the-incorrect-branch
# Ensure you're in the branch that you commited to by accident.
git checkout master
# Reset the branch back one commit.
git reset --soft HEAD^
# Stash the changes
git stash
@adeluccar
adeluccar / anki.css
Last active August 29, 2015 14:11 — forked from zabbarob/anki.css
@font-face {
font-family: junicode;
src: url('_junicode.ttf');
}
.card, table {
font-family: Helvetica, sans-serif, junicode;
font-size: 20px;
text-align: center;
color: #d03030;
background-color: #fafaf5;