Skip to content

Instantly share code, notes, and snippets.

@brettflorio
brettflorio / zohodesk.foxyio.user.js
Last active November 13, 2020 22:24
Foxy.io's "Make Zoho Desk Actually Usable" Userscript
// ==UserScript==
// @name Foxy.io's "Make Zoho Desk Actually Usable" Userscript
// @downloadUrl https://gist.github.com/brettflorio/db0701fa5a78119924b67bc4b1b2673b
// @updateUrl https://gist.github.com/brettflorio/db0701fa5a78119924b67bc4b1b2673b
// @namespace http://support.foxy.io/
// @version 0.2.3
// @description Trying to make Zoho Desk a little more tolerable.
// @author Foxy.io
// @match https://support.foxy.io/*
// @grant GM_addStyle
@brettflorio
brettflorio / gist:749350
Created December 21, 2010 01:42
Adds a coupon code entry to the checkout page. For FoxyCart v0.7.0
// FOR TESTING PURPOSES ONLY
// FoxyCart v0.7.0+
// 2010.12.20
FC.checkout.InitCoupon = function() {
fc_cart_foot_discount_new = '<tr id="fc_cart_foot_discount_new"><td class="fc_col1" colspan="2"><a href="#" onclick="FC.checkout.AddCoupon(); this.blur(); return false;">Add a coupon</a></td><td class="fc_col2"><input type="text" name="coupon" id="fc_coupon" class="fc_text fc_text_short" value="" style="display:none;" /><a id="fc_coupon_apply" href="javascript:;" style="display:none;">Apply!</a></td></tr>';
if (jQuery('#fc_cart_foot_discount_new').length == 0) {
jQuery(fc_cart_foot_discount_new).insertBefore('#fc_cart_foot_shipping');
}
<?php
// SNIPPET: PhotoDimensions
//
// Parameters:
// image
// classWide
// classTall
if (!$image) {
return '';
@brettflorio
brettflorio / foxycart.checkout.coupons.js
Created January 31, 2010 12:59
Add the ability to enter coupon codes to the FoxyCart v060 checkout
// FOR TESTING PURPOSES ONLY
FC.checkout.InitCoupon = function() {
fc_cart_foot_discount_new = '<tr id="fc_cart_foot_discount_new"><td class="fc_col1" colspan="2"><a href="#" onclick="FC.checkout.AddCoupon(); this.blur(); return false;">Add a coupon</a></td><td class="fc_col2"><input type="text" name="coupon" id="fc_coupon" class="fc_text fc_text_short" value="" style="display:none;" /><a id="fc_coupon_apply" href="javascript:;" style="display:none;">Apply!</a></td></tr>';
if (jQuery('#fc_cart_foot_discount_new').length == 0) {
jQuery(fc_cart_foot_discount_new).insertBefore('#fc_cart_foot_shipping');
}
jQuery('#fc_coupon_apply').unbind('click').click(function(){
@brettflorio
brettflorio / FoxyCart: Restrict countries on checkout autocompleter
Created January 28, 2010 20:15
JavaScript to restrict the autocomplete arrays on the FoxyCart v060 checkout
<script type="text/javascript" charset="utf-8">
jQuery(document).ready(function(){
// Set the indexes for the countries you want to allow
var usIndex = -1;
var caIndex = -1;
// Find their positions in the array using the 2 character ISO code
for (var i = 0; i < FC.locations.config.locations.length; i++) {
if (FC.locations.config.locations[ i ].cc2 == "US") {
usIndex = i;
} else if (FC.locations.config.locations[ i ].cc2 == "CA") {
#!/bin/sh
# Use TrueCrypt from the command line on OS X without the GUI popping up with this magic two-line shell script.
# Really, TrueCrypt should check argv[0] to find out if it was invoked as 'truecrypt,' but this is a nice workaround.
# Install into /usr/local/bin, mode 755
exec /Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt -t $@