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
<!-- put this code in custom html <head> section (Website Configuration) --> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
if ( /magnaflow/i.test($("h1").text()) ) { | |
$("#ctl00_MainContentPlaceHolder_YourPriceLabel").after("<br/>Use Coupon: MAGNAFLOW for an extra 5% off"); | |
} | |
if ( /aeromotive/i.test($("h1").text()) ) { | |
$("#ctl00_MainContentPlaceHolder_YourPriceLabel").after("<br/>Use Coupon: AEROMOTIVE for an extra 5% off"); | |
} | |
}); |
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
import time | |
from datetime import datetime | |
def parse_iis(logger, line): | |
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken | |
line_date, line_time, server_ip, cs_method, cs_uri_stem, cs_uri_query, server_port, cs_username, client_ip, cs_user_agent, cs_referer, status_code, sub_status, win32_status, time_taken = line.split() | |
dt = datetime.strptime(line_date+"T"+line_time, "%Y-%m-%dT%H:%M:%S") | |
dt = time.mktime(dt.timetuple()) |
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
<!-- Copy and paste this code to Configuration -> Website -> Custom HTML <head> --> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$('#brandlist ul').hide().parent().append('<select>'); $('#brandlist ul li').each(function(){ var link = $(this).find('a'); | |
$('#brandlist select').append('<option value="'+link.attr('href')+'">'+link.html()+'</option>'); | |
}); | |
$('#brandlist select').on("change", function(){ | |
window.location.href = $(this).val(); | |
}); | |
}); |
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 type="text/javascript"> | |
$(document).ready(function(){ | |
if ( /(clutch masters|name of other brand|name of 3rd brand)/i.test($("h1").text()) ) { | |
$("#ctl00_MainContentPlaceHolder_YourPriceLabel").after("<br/>Coupon Code: megancoilovers<br/>Discount: Extra 5% off"); | |
} | |
}); | |
</script> |
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
# 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. |
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/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 |