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 | |
# | |
# Usage: dev_signed_cert.sh HOSTNAME | |
# | |
# Creates a CA cert and then generates an SSL certificate signed by that CA for the | |
# given hostname. | |
# | |
# After running this, add the generated dev_cert_ca.cert.pem to the trusted root | |
# authorities in your browser / client system. | |
# |
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
const getRelativeParent = element => { | |
if (!element) { | |
return null; | |
} | |
const position = window | |
.getComputedStyle(element) | |
.getPropertyValue('position'); | |
if (position !== 'static') { | |
return element; |
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
// Make this into a bookmark, and clicking it while you have a task selected in Asana will copy a markdown | |
// formatting link to that task with title and text. This can then be pasted into some markdown-friendly | |
// location like a github comment. | |
javascript: void (function() { var textArea = document.createElement("textarea"); textArea.value = `[${(document.querySelector('.SingleTaskTitleRow-taskName textarea') || document.querySelector('textarea#details_property_sheet_title') || {value: document.title.replace(' - Asana', '')}).value}](${location.href})`; document.body.append(textArea); textArea.select(); document.execCommand('copy'); document.body.removeChild(textArea); })(); |
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 | |
# Re-center all the pngs in the current folder using ImageMagick | |
for F in *.png ; do | |
convert -size $(identify -format '%wx%h' $F) xc:white \( $F -trim \) -gravity center -compose copy -composite $F | |
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
var gulp = require('gulp'); | |
var plugins = require('gulp-load-plugins')(); | |
var del = require('del'); | |
var merge = require('merge-stream'); | |
var path = require('path'); | |
var RevAll = require('gulp-rev-all'); | |
var runSequence = require('run-sequence'); | |
var os = require('os'); | |
src = [ |
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 | |
PROJECT_DIR=$(git rev-parse --show-toplevel) | |
BASE_COMMIT='upstream/develop' | |
OLD_ERRS=$(mktemp) | |
NEW_ERRS=$(mktemp) | |
# Clean up temp files on interrupt/exit | |
trap "rm -f $NEW_ERRS" EXIT SIGINT |
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
package caltrac.db; | |
import java.sql.ResultSet; | |
import java.sql.ResultSetMetaData; | |
import java.sql.SQLException; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.skife.jdbi.v2.StatementContext; | |
import org.skife.jdbi.v2.tweak.ResultSetMapper; |
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
// Create a new bookmark, write javascript: and paste in the next line: | |
// When you are on the WebEx page to fill out name and email, click the bookmarklet | |
(function (name, email) { var f=window.parent.frames[1], e=(function(id) { return f.document.getElementById(id) }), an = e('attendeeName'), ae = e('attendeeEmail'), but=e('mwx-btn-pmr-enter-lobby'); an.value=name; f.AttEmailOnblur(); ae.value='dvandermeer@pulsesecure.net'; but.disabled=false; })("Dobes Vandermeer", 'dvandermeer@pulsesecure.net') |
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 | |
/* | |
Plugin Name: Automatic Featured Images from YouTube / Vimeo | |
Plugin URI: http://webdevstudios.com | |
Description: If a YouTube or Vimeo video exists in the first few paragraphs of a post, automatically set the post's featured image to that vidoe's thumbnail. | |
Version: 1.0.1 | |
Author: WebDevStudios | |
Author URI: http://webdevstudios.com | |
License: GPLv2 |