Skip to content

Instantly share code, notes, and snippets.

View kylewest's full-sized avatar

Kyle West kylewest

View GitHub Profile
@kylewest
kylewest / Drop All Database Objects.sql
Created June 15, 2009 11:40
Drop All Database Objects.sql
-- THIS SCRIPT WILL DROP ALL DATABASE OBJECTS IN ANY MSSQL DATABASE
declare @n char(1)
set @n = char(10)
declare @stmt nvarchar(max)
-- procedures
select @stmt = isnull( @stmt + @n, '' ) +
'drop procedure [' + name + ']'
@kylewest
kylewest / free-shipping.html
Created April 30, 2010 18:32
RPMWare Free Shipping Javascript
<script type="text/javascript">
$(document).ready(function(){
$("#ctl00_MainContentPlaceHolder_YourPriceLabel").after("<br/>FREE SHIPPING");
});
</script>
@kylewest
kylewest / free-shipping-2.html
Created October 20, 2010 16:11
RPMWare Free Shipping Javascript v2.0
<script type="text/javascript">
$(document).ready(function() {
var yourPriceLabel = $("#ctl00_MainContentPlaceHolder_YourPriceLabel");
if (yourPriceLabel.length) {
var itemPrice = parseFloat(yourPriceLabel.text().replace(/[^\d\.]+/g,""));
console.log(itemPrice);
if (itemPrice != NaN) {
// Replace "ENTER_YOUR_PRICE_HERE" with the starting price you want free shipping displayed. E.g. 150.00 or 123.45. Do NOT enter a dollar sign!
if (itemPrice >= 200) {
console.log("Item is eligible for free shipping");
@kylewest
kylewest / embed-ymm-picker.html
Created February 9, 2011 16:26
Snippet to embed the year make model picker on RPMWare websites.
<h2>Select A Vehicle</h2>
<iframe frameborder="0" height="125" scrolling="no" src="../../VehiclePicker.aspx" style="width: 220px; height: 125px;" width="220"></iframe>
<!-- NOTE: You can change the dimensions to whatever you like; however, the height should be around 125px since that is the approximate height of the picker. Shorter you wouldn't be able to see the "Select Vehicle" button. Taller and you will take up too much screen real estate. -->
@kylewest
kylewest / rpmware-partnumber-change.html
Created May 2, 2011 18:53
RPMWare Change PartNumber to Any HTML
<script type="text/javascript">
$(document).ready(function(){
// You may replace "Click Here For Price..." with any valid HTML.
$("#vehicles .partnumber a").html("Click Here For Price...");
});
</script>
@kylewest
kylewest / hide-powered-by.html
Created October 4, 2011 16:52
Hides "Powered By RPMWARE" logo on RPMWare powered sites.
<!-- copy and paste the below to Login -> Configuration -> Website Configuration -> Custom HTML <head> to hide the "Powered By RPMWARE" logo in your site's footer. -->
<style type="text/css">
#poweredby {display:none;}
</style>
@kylewest
kylewest / gist:1514301
Created December 23, 2011 14:07
replace all 3-character HEX color codes with 6-character codes in vim
# this will replace all 3-character HEX color codes with 6-character codes in vim.
%s/#\([0-9A-Fa-f]\)\([0-9A-Fa-f]\)\([0-9A-Fa-f]\)\([0-9A-Fa-f]\)\@!/#\1\1\2\2\3\3/g
1--
2---------------------------------------------
3--------------
4----------------
5-
1. substitution.
@kylewest
kylewest / syslog-ng.conf
Created December 30, 2011 02:18
syslog-ng
@version: 3.0
# For a description of syslog-ng configuration file directives, please read
# the syslog-ng Administrator's guide at:
#
# http://www.balabit.com/dl/html/syslog-ng-admin-guide_en.html/bk01-toc.html
#
# Source: https://wiki.archlinux.org/index.php/Syslog-ng
#
##########################################################
@kylewest
kylewest / install-zsh.sh
Created December 30, 2011 02:28
install zsh from source ubuntu
#!/bin/sh
# Build Zsh from sources on Ubuntu.
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file.
# Some packages may be missing
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo
git clone git://zsh.git.sf.net/gitroot/zsh/zsh
cd zsh
@kylewest
kylewest / flow-getting-started.markdown
Created January 6, 2012 15:19
flow getting started - getflow.com

I've been using Flow since it came out. It works well and I like having all my personal and work stuff in the same place.

Here is a crash course on getting started:

Adding Tasks

Classic Way

  • Hit <enter>, start typing.
  • Tab to other fields as necessary.