Skip to content

Instantly share code, notes, and snippets.

@bojanbjelic
bojanbjelic / .htaccess
Created April 20, 2012 21:31 — forked from necolas/.htaccess
Simple, quick way to concatenate, minify, and version static files in a Wordpress theme
# Filename-based cache busting
# taken from https://github.com/h5bp/html5-boilerplate/
# This rewrites file names of the form `name.123456.js` to `name.js`
# so that the browser doesn't use the cached version when you have
# updated (but not manually renamed) the file.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
@bojanbjelic
bojanbjelic / alfred-script.sh
Created April 11, 2012 08:10 — forked from gka/alfred-script.sh
Local full-text search on tweets and favorites
cd /your/local/path/to/tweet-search/
rm last-results.html
search.py {query}
open last-results.html
@bojanbjelic
bojanbjelic / RecursiveReplace.ps
Created January 16, 2012 12:33 — forked from jongalloway/RecursiveReplace.ps
Recursive replace in files (PowerShell)
$find = 'jquery-1\.4\.4'
$replace = 'jquery-1\.5\.1'
$match = '*.cshtml' , '*.vbhtml'
$preview = $true
foreach ($sc in dir -recurse -include $match | where { test-path $_.fullname -pathtype leaf} ) {
select-string -path $sc -pattern $find
if (!$preview) {
(get-content $sc) | foreach-object { $_ -replace $find, $replace } | set-content $sc
}