Skip to content

Instantly share code, notes, and snippets.

@TerryMooreII
TerryMooreII / menu.html
Created September 24, 2012 00:23
Pure CSS Menu
<!--
Pure CSS Menu example
-->
<html>
<head>
<title>Pure CSS Menu</title>
<style>
/*
@TerryMooreII
TerryMooreII / gist:3773565
Created September 24, 2012 00:28
Query Phish.net API with Pythin
#Query Phish.net API via Python 2.71.
import urllib, json, sys
url='https://api.phish.net/'
js='api.js'
apikey = 'Your API Key'
format = 'json'
apiver = '2.0'
@TerryMooreII
TerryMooreII / gist:3773572
Created September 24, 2012 00:29
Get Oracle DBMS_Output from Python's cx_Oracle library
import cx_Oracle
conn = cx_Oracle.Connection("userid/password@tns")
curs = conn.cursor()
curs.callproc("dbms_output.enable")
sqlCode = """
some long
sql code
with dbms_output
@TerryMooreII
TerryMooreII / gist:3773575
Created September 24, 2012 00:31
Check Gmail from Bash with Perl
#!/bin/bash
curl -u motersho@gmail.com --silent "https://mail.google.com/mail/feed/atom" |
perl -ne \
'
print "SUBJECT: $1 \n" if /<title>(.+?)<\/title>/;
print "RECEIVED $1 \n" if /<issued>(.+?)<\/issued>/;
print "FROM: $1 " if /<name>(.+?)<\/name>/;
print "($1)\n\n" if /<email>(.+?)<\/email>/;
'
@TerryMooreII
TerryMooreII / gist:3773579
Created September 24, 2012 00:32
Sending SMTP Commands with /dev/tcp
#!/bin/bash
# Written by: Terry Moore
# Created on Date: 2009-10-12
# Test mail relay from a Linux database server
# Version 0.2
# Last update 2009-10-13
#Body of Email
DATA="The test message has been sent"
@TerryMooreII
TerryMooreII / gist:3773583
Created September 24, 2012 00:34
Parsing NHL.com for Players information and saving data to CSV file (w/ AUTOIT)
#include <Array.au3>
#include <IE.au3>
#include <File.au3>
$csvFile = "c:\temp\players.csv"
for $i = 1 to 30
$ieObject = _IECreate ("http://www.nhl.com/ice/app?service=page&page=playerstats&fetchKey=20112ALLAASAll&viewName=bios&sort=player.birthCountryAbbrev&pg=" & $i)
@TerryMooreII
TerryMooreII / more.html
Created October 8, 2012 19:50
More Plugin
<!doctype html>
<html>
<head>
<title></title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<style>
*{padding:0px; margin:0px;}
/**
* Replace $.ajax on your subdomain with a copy taken
* from your base domain. All jQuery AJAX actions go
* through $.ajax (i.e. $.get, $.post), so it's all good.
*/
(function() {
var iframe,
onload,
queue = [],
@TerryMooreII
TerryMooreII / gist:5585240
Last active December 17, 2015 09:09
Baseball filed in CSS3 - work in progress
<!-- http://cssdeck.com/labs/baseball-field -->
<html>
<head>
<title>CSS3 Baseball field</title>
<style type="text/css">
#field{
position:absolute;
@TerryMooreII
TerryMooreII / jquery.moble.panelOpenSwipe.js
Last active December 20, 2015 03:29
Jquery Mobile open panel by sliding by starting slide from left edge
(function(){
var swiperight = null;
$('body').on('touchstart vmousedown', function(e){
if (e.pageX < 20)
swiperight = e.pageX;
else
swiperight = null;
});