Skip to content

Instantly share code, notes, and snippets.

View pale2hall's full-sized avatar
💻
Doing @tboltusa stuff!

Vince Pale pale2hall

💻
Doing @tboltusa stuff!
View GitHub Profile
#!/bin/bash
# Check Amazon Lowest Price
while true
do
leCount=$( curl -s http://www.amazon.com/gp/aw/d/AISN_NUMBER_HERE | grep -c COMPANY )
if [[ $leCount -gt 0 ]]
then
echo "Still Lowest... "
date
@pale2hall
pale2hall / Bootstrap 3 Default Alert Class
Created February 11, 2015 18:33
Bootstrap 3 Default Alert Class
<?php /*Idea: You can fake a default using the well class! */?>
<div class="well alert text-center"><strong>Update on Feb 4th 2015</strong>: Fixed small bug where the query was looking at orders of multiple of the same item as one sale.</div>
@pale2hall
pale2hall / gist:cb542f213a08b08ad011
Created February 16, 2015 23:32
Post Last.FM Recent Tracks Scrobbled to Hall.com's integration API
#pip install feedparser
#pip install python_hall
from python_hall import Hall
import time
import feedparser
lastfmUsername = "pale2hall" # your last.fm Username
timeDelay = 60 #don't be a jerk. Keep this relatively high; Your songs aren't that short!
h = Hall('f011-----YOUR-HALL-TOKEN-----5f56') # from https://hall.com/docs/integrations/generic/
h.add_image('http://i.imgur.com/aF61IE9.gif')
# Run this file to rename flac files from file-name.flac to file-name.flac.part
# if they don't decode properly.
#####################################################################
import subprocess
import sys
import os
for root, dirs, files in os.walk('.'):
for filename in files:

Keybase proof

I hereby claim:

  • I am pale2hall on github.
  • I am pale (https://keybase.io/pale) on keybase.
  • I have a public key ASCSJGk8fgernzVUe5Kh7DIsXTrYWecplrwzERqrlxtcJQo

To claim this, I am signing this object:

@pale2hall
pale2hall / no-more-alabama.js
Created February 27, 2017 19:54
Prevent osCommerce from showing Alabama instead of the correct state.
/*
Installation:
Add this script right before the closing </body> tag in your /catalog/includes/template_bottom.php
Tested on a heavily modified installation of osCommerce v2.3.x
Explanation:
Once a page is loaded, this code checks to see if there's a <select> drop down box on the page with
the name of "state". The Create Account page and the edit your address book pages both use this
Select field. If a customer makes a mistake, and types the state wrong, and has some other issue with
their input, like an email address that already exists in the database, the customer is redirected back
<?php
@$in = $argv[1];
@$out = $argv[2];
@$v = $argv[3];
if($in == "HELP" || $in == "-h" || $in == "h" || $in == "" || ($out == "" AND $v == "")){
echo "\nUsage: php " . $argv[0] . " input output\n";
}
$line_in_count = 0;
$input = file($in);
Am I Wrong 
At the Bottom 
Battalions
Batter Up
Be Gone
Bed
Bought a Bride
Brothers
@pale2hall
pale2hall / my.sublime-keymap
Created February 1, 2018 16:01
Fix SublimeText3 KeyBindings for next file, previous file / next tab, previous tab
/*
I'm saving this in a gist because it is infurating to not have CTRL-TAB and CTRL-SHIFT-TAB
work the same way in GnomeTerminal, Chrome, Firefox, IE, File Managers, etc.
Go to Preferences > Key Bindings,
Replace everything, or or apropriately add the code below. Save. Tab to your heart's delight.
Source: https://forum.sublimetext.com/t/switching-tabs-with-keyboard/427/5
@pale2hall
pale2hall / colors.php
Created January 2, 2019 17:44
PHP Function for CSS Gradients from Array of Colors
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>PHP Color Gradient</title>
<style media="screen">
.gradient{
width: 100%;
height:2rem;
padding-top:1rem;