Skip to content

Instantly share code, notes, and snippets.

@gerardroche
gerardroche / gist:9e08f18d4ef4dade35ca
Created October 7, 2014 00:17
ant-strip-php-require_once
<echo message="Stripping require_once calls..." />
<replaceregexp byline="true">
<regexp pattern="require_once" />
<substitution expression="// require_once" />
<fileset dir="${build.files.dir}" includes="**/*.php" />
</replaceregexp>
@gerardroche
gerardroche / fix-banshee-db
Created October 7, 2014 00:37
Fix Banshee media player db after backup from another system
# backup
mkdir -pv ~/backup/banshee
cp ~/.config/banshee-1/banshee.db ~/backup/banshee/banshee.db
# clear any cache
rm -rfv ~/.cache/banshee-1/
# install sqlite3
sudo apt-get install sqlite3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Site is down for maintenence</title>
</head>
<body>
<article>
<h1>Site is temporary unavailable.</h1>
<p>We are currently performing scheduled maintenance. Site will be back soon.</p>
@gerardroche
gerardroche / robots.txt
Created October 7, 2014 00:41
robots.txt snippet
# For documentation on how to use the robots.txt file see:
#
# - http://www.robotstxt.org/
# - https://support.google.com/webmasters/answer/156449
#
# To ban all spiders from the entire site uncomment the next two lines see
# http://www.robotstxt.org/wc/norobots.html:
#
# User-Agent: *
# Disallow: /
@gerardroche
gerardroche / apt-get install fglrx updates
Created July 25, 2012 20:12
ATI/AMD proprietary FGLRX graphics install updates fix for Ubuntu
#!/bin/sh
if [ $(/usr/bin/id -u) != "0" ]; then
echo 'Must be run by root user'
exit 1
fi
apt-get --purge remove fglrx*
apt-get install fglrx-updates fglrx-amdcccle-updates
#!/bin/sh
set -e
unset CDPATH
unset IFS
init_strip_require_once() {
current_dir_name="$(basename "$PWD")"
//////////////////
// vim_hardtime //
//////////////////
// { "keys": ["left"], "command": "null", "context": [ { "key": "setting.command_mode", "operand": true } ]},
// { "keys": ["left"], "command": "null", "context": [ { "key": "setting.command_mode", "operand": false }, { "key": "setting.is_widget", "operand": false }, { "key": "auto_complete_visible", "operand": false } ]},
// { "keys": ["down"], "command": "null", "context": [ { "key": "setting.command_mode", "operand": true } ]},
// { "keys": ["down"], "command": "null", "context": [ { "key": "setting.command_mode", "operand": false }, { "key": "setting.is_widget", "operand": false }, { "key": "auto_complete_visible", "operand": false } ]},
// { "keys": ["up"], "command": "null", "context": [ { "key": "setting.command_mode", "operand": true } ]},
// { "keys": ["up"], "command": "null", "context": [ { "key": "setting.command_mode", "operand": false }, { "key": "setting.is_widget", "operand": false }, { "key": "auto_c
@gerardroche
gerardroche / gist:cd1dd9cb73b9c84c89f7a0def1ca7779
Last active July 8, 2016 12:08
sublime-generate-package-file-icon-preferences
#!/bin/sh
set -e
unset CDPATH
unset IFS
readonly SOURCE=$(readlink -nf "$0")
readonly SOURCE_PATH=$(dirname "$SOURCE")
readonly SOURCE_NAME=$(basename "$SOURCE")
show_usage() {
# 301 https://github.com/gerardroche/dotfiles