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
/** | |
* slides2png plays a dzslides presentation using WebDriver, captures each | |
* slide to a PNG and generates a shell script to collate the PNGs together | |
* into a PDF using convert (from ImageMagick). | |
* | |
* The URL of the presentation is passed as the sole argument to the script. | |
* If the presentation is local, specify the absolute path prefixed with the | |
* file:// protocol. | |
* | |
* @author Dan Allen |
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
# Playing ASCII drum tabs with Sonic Pi | |
# Ruby is an awesome language for String manipulation. | |
# Lets use that fact to play some drums! | |
# Tab for the Amen break taken from Wikipedia | |
# http://en.wikipedia.org/wiki/Amen_break | |
# Note that %Q{ ... } is just another way | |
# to define a string in Ruby |
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
[Unit] | |
Description=IPFS daemon | |
After=network.target | |
[Service] | |
### Uncomment the following line for custom ipfs datastore location | |
# Environment=IPFS_PATH=/path/to/your/ipfs/datastore | |
ExecStart=/usr/local/bin/ipfs daemon | |
Restart=on-failure |
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
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
.connect_timeout = 600s; | |
.first_byte_timeout = 600s; | |
.between_bytes_timeout = 600s; | |
} | |
acl purge { | |
"localhost"; |
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/sh | |
# Config for SSL. | |
echo "--- Making SSL Directory ---" | |
mkdir /etc/nginx/ssl | |
echo "--- Copying $i SSL crt and key ---" | |
openssl req -nodes -new -x509 -keyout /etc/nginx/ssl/server.key -out /etc/nginx/ssl/server.crt -subj "/C=US/ST=NY/L=NYC/O=Dis/CN=www.example.com" | |
echo "--- Turning SSL on in nginx.conf. ---" |
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/sh | |
# | |
# Example showing use of getopt detection and use of GNU enhanced getopt | |
# to handle arguments containing whitespace. | |
# | |
# Written in 2004 by Hoylen Sue <hoylen@hoylen.com> | |
# | |
# To the extent possible under law, the author(s) have dedicated all copyright and | |
# related and neighboring rights to this software to the public domain worldwide. | |
# This software is distributed without any warranty. |
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
# git safe origin | |
# - | |
# save local work to a separate branch and revert to the current branches origin | |
# I have this in my ~/.zshrc | |
gso() | |
{ | |
branch=$(git rev-parse --abbrev-ref HEAD); qualifier=$(date -u +"%Y-%m-%dT%H%M%S") \ | |
&& git add . \ | |
&& git commit -m "Saving local work from $branch to local/stash/$branch-$qualifier" \ | |
&& git branch local/stash/$branch-$qualifier \ |
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
# git-ics | |
# Place in your $PATH (e.g. ~/bin) | |
# Accepts any options that can be passed to git log | |
# usage: git ics [opts] > cal.ics | |
echo BEGIN:VCALENDAR | |
echo METHOD:PUBLISH | |
echo VERSION:2.0 | |
echo PRODID:-//git-ics//git-ics//EN | |
echo CALSCALE:GREGORIAN |
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
units = { | |
right30 = { x = 0.70, y = 0.00, w = 0.30, h = 1.00 }, | |
right70 = { x = 0.30, y = 0.00, w = 0.70, h = 1.00 }, | |
left70 = { x = 0.00, y = 0.00, w = 0.70, h = 1.00 }, | |
left30 = { x = 0.00, y = 0.00, w = 0.30, h = 1.00 }, | |
top50 = { x = 0.00, y = 0.00, w = 1.00, h = 0.50 }, | |
bot50 = { x = 0.00, y = 0.50, w = 1.00, h = 0.50 }, | |
upright30 = { x = 0.70, y = 0.00, w = 0.30, h = 0.50 }, | |
botright30 = { x = 0.70, y = 0.50, w = 0.30, h = 0.50 }, | |
upleft70 = { x = 0.00, y = 0.00, w = 0.70, h = 0.50 }, |
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
/** | |
* Provides a `v-responsive-class` Vue directive to toggle css classes based on the containing element's width. | |
* Think @media queries, but based on the parent element. Useful for web components. | |
* | |
* The breakpoints match the ones in Bootstrap: | |
* * xs: < 576 - Extra small devices (portrait phones, less than 576px) | |
* * s: >= 576 - Small devices (landscape phones, 576px and up) | |
* * m: >= 768 - Medium devices (tablets, 768px and up) | |
* * l: >= 992 - Large devices (desktops, 992px and up) | |
* * xl: >= 1200 - Large desktops, 1200px and up |
OlderNewer