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
# Example Makefile for compiling CSS and Javascript in watched folder | |
PHONY: optimize | |
css: | |
@cat assets/css/normalize.css assets/css/app.css > public/assets/all.css | |
@echo Built all.css | |
js: | |
@cat assets/js/jquery.js assets/js/jquery.cookie.js assets/js/app.js > public/assets/all.js |
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
directory: /Volumes/BigMedia/Beets | |
library: /Volumes/BigMedia/Beets.blb | |
import: | |
move: no | |
copy: yes | |
write: yes | |
paths: | |
default: $albumartist - $album%aunique{}/$track $title | |
singleton: $albumartist - Singles/$artist - $title | |
comp: $album%aunique{}/$track $artist - $title |
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
diff --git a/wp-content/plugins/custom-post-types-relationships-cptr/cptr.php b/wp-content/plugins/custom-post-types-relationships-cptr/cptr.php | |
index 2d82e17..853a51d 100644 | |
--- a/wp-content/plugins/custom-post-types-relationships-cptr/cptr.php | |
+++ b/wp-content/plugins/custom-post-types-relationships-cptr/cptr.php | |
@@ -136,7 +136,7 @@ function cptr_category_selector() { | |
if (!empty($relations)) : | |
foreach($relations as $relation) : | |
$post = get_post($relation); | |
- echo "<div title='" . $post->post_title . "' class='thepost' id='post-".$post->ID ."'> | |
+ echo "<div title='" . esc_attr($post->post_title) . "' class='thepost' id='post-".$post->ID ."'> |
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 | |
# | |
# trinkup - TRivial INcremental bacKUP script | |
# | |
# Licensed under DWTFYWWI license, but recommended to be used before drinkup. | |
# | |
set -e | |
if ! which rsync >/dev/null; then |
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
* Script to record and tag spotify tracks, by Lloyd Moore *) | |
(* Make sure you are already recording in Audio Hijack Pro with a session called 'spotifySession' *) | |
tell application "Spotify" | |
set currentTrack to (current track) | |
set trackName to (name of currentTrack) | |
tell application "Audio Hijack Pro" | |
set theSession to my getSession() | |
end tell | |
repeat |
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
# backup_060403.tar.gz | |
tar -czf backup_$(date +%y%m%d).tar.gz | |
# test_20110519-150054.jpg | |
mv example.jpg test_$(date +%Y%m%d-%H%M%S).jpg | |
# test_1305835327.jpg (timestamp) | |
mv example.jpg test_$(date +%Y%m%d-%H%M%S).jpg |
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
RewriteEngine on | |
RewriteCond %{SERVER_PORT} ^443$ | |
RewriteCond %{REQUEST_URI} !^/facebook_app | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] | |
# This lets traffic that isn’t on port 443 (ssl) and isn't at /facebook_app/* | |
# and redirects it to the same path, but with SSL. This essentially lets stuff in | |
# /facbeook_app/* slide through over ssl or non-ssl, but nothing else. |
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 | |
// Sample Usage | |
$uri_to_fetch = 'http://example.tld/path/to/uri'; | |
$cache_on = true; | |
$cache_key = md5( $uri_to_fetch ); | |
$cache_ttl = 60 * 15; // 15 minutes | |
$cache_file = '/tmp/example.tld/'.$cache_key; | |
if (file_exists($cache_file) && |
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
require 'rubygems' | |
require 'selenium-webdriver' | |
driver = Selenium::WebDriver.for :ie | |
driver.get "https://www.google.com" | |
driver.save_screenshot("./screen.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 | |
# Automated Deployments from Bitbucket/Github Service Hook | |
# Graciously borrowed from: http://brandonsummers.name/blog/2012/02/10/using-bitbucket-for-automated-deployments/ | |
date_default_timezone_set('America/Chicago'); | |
class Deploy { | |
/** | |
* A callback function to call after the deploy has finished. |
OlderNewer