This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
require 'yaml' | |
current_dir = File.dirname(File.expand_path(__FILE__)) | |
configs = YAML.load_file("#{current_dir}/config.yaml") | |
Vagrant.configure("2") do |config| | |
# ... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if (( $# == 0 )); then | |
echo "$0 my.zip" | |
exit 1 | |
fi | |
fbase=$(basename "$1") | |
fdir="${fbase%.*}" | |
mkdir "$fdir" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export SURNAME='Bob' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use AppleScript version "2.4" -- Yosemite (10.10) or later | |
use scripting additions | |
(* | |
Create a folder in Apple Notes called Exported | |
Create a folder in Evernote called Imported | |
Then for each folder set the variable to the name of the folder | |
Known issues: doesn't copy images, scanned documents and embedded links (it's html). | |
Workaround: select note contents, copy and paste into Evernote. Scanned documents can be exported to PDF and dragged into EverNote. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# v1 - 2019-05-06 | |
# Upload latest screenshot in ~/Pictures and notify URL and send to clipboard | |
# requires a domain to upload; xclip to send to clipboard; and gnome to notify. | |
SITE='https://my.domain' | |
FILE=$(ls -t ~/Pictures/Screenshot*.png | head -1) | |
if [ ! -z "$FILE" ]; then | |
HASH=$(md5sum "$FILE"| head -n1 | awk '{print $1;}') | |
mv "$FILE" "/tmp/${HASH}.png" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// mu-plugins/theme-features.php | |
require_once( FEATURES_DIR . '/myfeature.php' ); | |
// mu-plugins/theme-features/myfeature.php | |
function features_myfeature_init() { | |
if ( current_theme_supports( 'myfeature' ) ) { | |
add_action( 'some_hook', 'features_myfeature' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
rm -rf old | |
cp -R html old | |
pushd html | |
git stash | |
git pull | |
composer update | |
cd .. | |
ln -sf `pwd`/config.ini `pwd`/html/config.ini | |
ln -sf `pwd`/Uploads `pwd`/html/Uploads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Convert CSV to Netscape Bookmark File | |
Works for files exported by Instapaper. | |
author: Sander van Dragt <sander@vandragt.com> | |
version: 2019-10-23.01 | |
""" | |
import csv | |
from sys import argv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias git-create="git-util.py $1 $2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"repositories": [ | |
{ | |
"type": "vcs", | |
"url": "https://github.com/wp-shortcake/shortcake" | |
}, | |
], | |
"require": { | |
"oomphinc/composer-installers-extender": "^1.1", | |
"fusioneng/shortcake": "dev-master#0.7.4" |