Skip to content

Instantly share code, notes, and snippets.

@imperialwicket
imperialwicket / default_results.php
Created February 22, 2012 01:56
Joomla 1.7 custom search results
<?php
/**
* @version $Id: default_results.php 21321 2011-05-11 01:05:59Z dextercowley $
* @package Joomla.Site
* @subpackage com_search
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
@imperialwicket
imperialwicket / setup.sql
Last active November 10, 2022 00:26
PostgreSQL monthly table partitions
--
-- DEPRECATED GIST
-- **** Moved to a repo: https://github.com/imperialwicket/postgresql-time-series-table-partitions ****
--
-- You should check the repository, this gist won't receive updates.
--
--
--
--
--
@imperialwicket
imperialwicket / cleaner.sh
Last active June 24, 2022 20:40
Cleaner.sh - Bash script for cleaning directory contents
#!/bin/bash
#######################
# cleaner.sh
# by imperialWicket
#
# version 1.0.1
#######################
# cleaner usage function
@imperialwicket
imperialwicket / chicagoboss
Created October 12, 2012 14:19
Chicago Boss init.d
#!/bin/bash
#
# /etc/rc.d/init.d/chicagoboss
#
# Starts Chicago Boss from the /home/boss/cb_admin directory.
#
# Source function library.
. /etc/rc.d/init.d/functions
@imperialwicket
imperialwicket / useradd_hack.sh
Created November 6, 2012 23:25
Adds a user with key and home dir
#!/bin/bash
EXPECTED=1
if [ $# -ne $EXPECTED ]
then
echo "Please provide a username argument."
exit 5
fi
@imperialwicket
imperialwicket / openstack-python-packages.sh
Last active December 14, 2015 22:19
Bash script for installing the various openstack python clients and populating a file with appropriate environment variables.
#!/bin/bash
#####################################################################
#
# openstack-python-packages.sh
#
# https://gist.github.com/imperialWicket
#
# This scripts automates much of getting started process for
# openstack cli installation (python clients). Pip is required for
# this script to work, and also Python 2.x (x > 6). Pip presence is
@imperialwicket
imperialwicket / s3-s3cmd-sync-dated-dirs.sh
Last active December 15, 2015 00:19
Bash script for syncing portions of s3 bucket based on dated directory structures.
#!/bin/bash
##################################################
#
# s3-s3cmd-sync-dated-dirs.sh
#
# Easily download content in dated directory
# structures from s3.
#
#
# https://gist.github.com/imperialWicket
@imperialwicket
imperialwicket / nginx.conf-partial
Created February 19, 2014 22:03
nginx kibana config for user-specific dashboard
location ~ ^/app/dashboards/default\.json.*$ {
rewrite ^/app/dashboards/default\.json(.*)$ /app/dashboards/$remote_user.json$1 break;
}
@imperialwicket
imperialwicket / keybase.md
Created September 24, 2014 16:10
keybase.md

Keybase proof

I hereby claim:

  • I am imperialwicket on github.
  • I am imperialwicket (https://keybase.io/imperialwicket) on keybase.
  • I have a public key whose fingerprint is 404E 1FAF D1D0 4BA8 5022 145F 2088 41AB DEB4 B0D0

To claim this, I am signing this object:

@imperialwicket
imperialwicket / .bash_aliases
Created February 19, 2015 18:07
Bash alias for generating GitHub Pull Requests
# Bash alias to generate pull requests on github.com
#
# PreRequisites:
# Create an auth token (bypasses 2 factor auth, when enabled):
# https://github.com/settings/tokens/new
#
# Use any name, something like 'pull requests' makes sense.
# Allow permissions 'repo' and 'public repo'.
# Create.
#