Skip to content

Instantly share code, notes, and snippets.

@milojennings
milojennings / .bash_aliases
Created October 12, 2018 22:03 — forked from facelordgists/.bash_aliases
My .bash_profile used on Mavericks OSX 10.9
#!/bin/bash
## ==================================
## Servers
## ==================================
# A server with a non-standard SSH port, using passwordless RSA key authentication
alias server1='ssh -p 2200 user@server-domain.com'
# A server that uses a certficate for authentication
@milojennings
milojennings / speedtest-zapier.sh
Last active March 25, 2018 20:58 — forked from dvdsmpsn/speedtest-ifttt.sh
Modified version of Henrik Bengtsson's speedtest-cli code which will dispatch the test results to Zapier
#!/usr/bin/env bash
###########################################################################
# Originally written by: Henrik Bengtsson, 2014
# https://github.com/HenrikBengtsson/speedtest-cli-extras
# Modified to use Zapier by: Milo Jennings, 2018
# Further modified to store a permanent log locally with all the details in
# a CSV file on the desktop (designed for Mac use)
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html]
# See Google Sheet Template: https://docs.google.com/spreadsheets/d/1usJKKMoUpt-VWI94aJ_rU4qLj3ImjDoNt6HqFL-wcRE/edit?usp=sharing
# -------------------------------------------------------------------------
@milojennings
milojennings / index.html
Created April 3, 2017 00:36
Time since Indie was born
<div class="wrap">
<h2>Time since <br>Indie was born <small id="birthdate">08/31/2015 4PM</small></h2>
<span class="heartbeat">Loading...</span>
<p id="total"></p>
<p id="secs"></p>
<p id="mins"></p>
<p id="hours"></p>
<p id="days"></p>
<p id="weeks"></p>
<p id="months"></p>

For setting the file's modification date to the creation date:

For videos

exiftool "-filemodifydate<CreateDate" *.MOV

For photos

exiftool "-filemodifydate<datetimeoriginal" *.JPG
@milojennings
milojennings / Time since Cadence was born.markdown
Created October 30, 2015 02:57
Time since Cadence was born

Time since Cadence was born

I was curious to know how old my niece was. This serves as a handy quick reference.

A Pen by FaceLord on CodePen.

License.

@milojennings
milojennings / git-completion.sh
Created October 5, 2015 10:16 — forked from evansolomon/git-completion.sh
Git auto-complete script
#!bash
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
@milojennings
milojennings / functions.php
Last active August 29, 2015 14:27 — forked from l2aelba/functions.php
This is a Multilingual Wordpress functions to detect a language by pretty URLs like..`domain.com/en/``domain.com/postname/en/``domain.com/pagetname/en/`Add this code in your `functions.php`After added code go to `wp-admin/options-permalink.php` press `Save Changes`So you can use`<?php echo lang();?>``<?php if( lang() === "en" ) ?>`In your theme...
<?php
function lang_support() {
return array('en','fr'); // Add your support lang-code (1st place is a default)
}
function rewrite_lang(){
$langs = lang_support();
foreach($langs as $lang) {
add_rewrite_endpoint($lang,EP_PERMALINK|EP_PAGES|EP_ROOT|EP_CATEGORIES);
}
@milojennings
milojennings / dabblet.css
Last active August 29, 2015 14:06
Zig Zag divider w/ SVG shadow experiment (buggy)
body {
background:url(http://i.imgur.com/qKsVr.png);
}
.box {
width:400px;
background: white;
position: relative;
}
@milojennings
milojennings / dabblet.css
Created September 16, 2014 23:41
awesome card
/* awesome card */
@list-color: #000000;
@front-card-back: #156AEA;
@front-p: #ffffff;
@back-p: #000000;
container {
-webkit-perspective: 1000;
}
<?php
class kirbytextExtended extends kirbytext {
function __construct($text, $markdown=true) {
parent::__construct($text, $markdown);
$this->addTags('figure');