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
tell application "Finder" | |
set theItems to selection | |
set folderName to name of item 1 of theItems | |
do shell script "sudo dscl localhost -create /Local/Default/Hosts/" & folderName & ".dev IPAddress 127.0.0.1" | |
end tell |
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
// set figure heights based on child image + figcaption heights | |
$(document).ready(function(){ | |
setFigureHeight(); | |
$(window).on('resize', setFigureHeight); | |
}); | |
function setFigureHeight() { | |
$('.story-image').each(function(index,value) { | |
imgHeight = $(this).outerHeight(true); | |
capHeight = $(this).next('figcaption').outerHeight(true); | |
figHeight = imgHeight + capHeight; |
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
// Responsive Slideshow in Wordpress | |
// https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images | |
// http://www.advancedcustomfields.com/pro | |
// http://jquery.malsup.com/cycle2/ | |
$images = get_field('gallery'); | |
if( $images ): ?> | |
<div class="cycle-slideshow" |
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
sudo update-rc.d varnish defaults 91 9 |
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
sudo find . -type f -print0 | sudo xargs -0 sed -i 's/:8080/:80/g' |
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
# This is my VCL file for Varnish 4.0.2 & Wordpress 4.0 | |
# | |
# ASSUME The builtin VCL is called afterwards. | |
# | |
# Specify VCL new 4.0 format. | |
vcl 4.0; | |
# Imports | |
import std; |
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
sudo update-rc.d varnish defaults 91 9 |
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 | |
/* | |
* I have a custom post type for my Portfolio, using Advanced Custom Fields for extra fields including a field for me to | |
* order the portfolio entires how I want. Standard single navigation using previous_post_link and next_post_link don't work as they | |
* return the order the posts were added. This fixes things: | |
*/ | |
// New query | |
$args = array( |
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 | |
# Batch convert SVG to PNG. Useful for creating new sizes of twemoji. | |
# Uses https://wiki.gnome.org/Projects/LibRsvg. On macOS install with 'brew install librsvg' | |
for file in svg/*.svg | |
do | |
filename="$(basename $file)" | |
name=$(echo $filename | cut -f 1 -d '.') | |
echo "Converting $file to $name.png" | |
rsvg-convert -h 36 -w 36 $file > 36x36/$name.png | |
done |
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/python3 | |
import sys | |
import os | |
import re | |
import jinja2 | |
import markdown | |
TEMPLATE = """<!DOCTYPE html> |
OlderNewer