Skip to content

Instantly share code, notes, and snippets.

View anotheremily's full-sized avatar

emily anotheremily

  • Las Vegas, Nevada USA
View GitHub Profile
#!/bin/bash
# get a sorted, deduped file list from grep
# instead of the standard grep output
# put in the grep parameters in place of
# GREPPARAMS
# @todo get around to making this a real shell script
grep GREPPARAMS | cut --d : -f 1 | sort | uniq
pacman -S xorg
pacman -S awesome
pacman -S git
<select name="country">
<?php
$curCountry = (isset($_POST['country'])) ? $_POST['country'] : '';
$countries = array('US'=>'United States','CA'=>'Canada','AF'=>'Afghanistan','AL'=>'Albania','DZ'=>'Algeria','AS'=>'American Samoa','AD'=>'Andorra','AO'=>'Angola','AI'=>'Anguilla','AQ'=>'Antarctica','AG'=>'Antigua and Barbuda','AR'=>'Argentina','AM'=>'Armenia','AW'=>'Aruba','AU'=>'Australia','AT'=>'Austria','AZ'=>'Azerbaijan','BH'=>'Bahrain','UM'=>'Baker Island','BD'=>'Bangladesh','BB'=>'Barbados','BY'=>'Belarus','BE'=>'Belgium','BZ'=>'Belize','BJ'=>'Benin','BM'=>'Bermuda','BT'=>'Bhutan','BO'=>'Bolivia','BA'=>'Bosnia and Herzegovina','BW'=>'Botswana','BV'=>'Bouvet Island','BR'=>'Brazil','IO'=>'British Indian Ocean Territory','VG'=>'British Virgin Islands','BN'=>'Brunei','BG'=>'Bulgaria','BF'=>'Burkina Faso','MM'=>'Burma','BI'=>'Burundi','KH'=>'Cambodia','CM'=>'Cameroon','CV'=>'Cape Verde','KY'=>'Cayman Islands','CF'=>'Central African Republic','TD'=>'Chad','CL'=>'Chile','CN'=>'China','CX'=>'Christmas Island','CC'=>
<select name="state">
<?php
$curState = (isset($_POST['state'])) ? $_POST['state'] : '';
$states = array( 'AK' => 'Alaska', 'AL' => 'Alabama', 'AR' => 'Arkansas', 'AZ' => 'Arizona', 'CA' => 'California', 'CO' => 'Colorado', 'CT' => 'Connecticut', 'DC' => 'District of Columbia', 'DE' => 'Delaware', 'FL' => 'Florida', 'GA' => 'Georgia', 'HI' => 'Hawaii', 'IA' => 'Iowa', 'ID' => 'Idaho', 'IL' => 'Illinois', 'IN' => 'Indiana', 'KS' => 'Kansas', 'KY' => 'Kentucky', 'LA' => 'Louisiana', 'MA' => 'Massachusetts', 'MD' => 'Maryland', 'ME' => 'Maine', 'MI' => 'Michigan', 'MN' => 'Minnesota', 'MO' => 'Missouri', 'MS' => 'Mississippi', 'MT' => 'Montana', 'NC' => 'North Carolina', 'ND' => 'North Dakota', 'NE' => 'Nebraska', 'NH' => 'New Hampshire', 'NJ' => 'New Jersey', 'NM' => 'New Mexico', 'NV' => 'Nevada', 'NY' => 'New York', 'OH' => 'Ohio', 'OK' => 'Oklahoma', 'OR' => 'Oregon', 'PA' => 'Pennsylvania', 'RI' => 'Rhode Island', 'SC' => 'South Carolina', 'SD' => 'South Dakota', 'TN' => 'Tennessee', 'TX' => 'Texas', 'UT' =
/**
* Creates rollover functionality in JavaScript
* requires JQuery
* Rollovers should by default have their off state as the
* original image src. Set the on and off markers with the
* variables on the first two lines. By default they are
* _on and _off (i.e. rollover_off.jpg, rollover_on.jpg.)
*/
function createRollovers() {
var onText = "_on",
/**
* creates javascript that causes links with the class newWindow to
* open in a new browser window
* requires jquery
*/
function createLinkTargets() {
$('a.newWindow').each(function() {
$(this).on('click', function () {
var newWindow = window.open($(this).attr('href'));
return false;
/**
* creates rollovers on items with the class rollover
* requires mootools 1.24 (core)
* -the id of the class should be the image base name
* -the text in the link should be the alt text for the image
*
* variables:
* prefix - any prefix (path, button prefixes, etc.) that are before the id for the iamge
* filetype - include preceding .)
* onText - text for on state
/**
* creates javascript that causes links with the class newWindow to open in a new browser window
* requires mootools v1.24 (core)
*/
"use strict";
function createLinkTargets() {
$(document.body).getElements( 'a.newWindow').each( function( el ) {
el.addEvent('click', function () {
var newWindow = window.open(el.getAttribute('href'));
el.href = '#';
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
function Stack() {
this.reset();
}
Stack.prototype.pop = function () {
if (this.empty() !== true) {
this.length -= 1;
return this.items.pop();
}
return undefined;