Skip to content

Instantly share code, notes, and snippets.

View anotheremily's full-sized avatar

emily anotheremily

  • Las Vegas, Nevada USA
View GitHub Profile
<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'=>
pacman -S xorg
pacman -S awesome
pacman -S git
#!/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
#!/bin/bash
# the hack attempt inserts <ads> tags into files
find . -exec grep "<ads>" '{}' \; -print &> ads-detections
# most of the files tend to be .js.php
find . -print | grep ".js.php" &> js-php-detections
@anotheremily
anotheremily / zyoung-yui-reset.css
Created October 19, 2010 20:48
Modified version of the YUI 3 Reset
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.2.0
build: 2676
Modified by zyoung
*/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}
@anotheremily
anotheremily / changelog.sh
Created November 19, 2010 16:54
Generates a list of files with changes
#!/bin/bash
# generates a list of files with changes
diff -r DIRECTORY1 DIRECTORY2 | grep ^diff | cut -d' ' -f3
@anotheremily
anotheremily / getNearbyZipCodes.sql
Created November 24, 2010 19:16
Get nearby zip codes from a certain zip code.
-- I think I fixed all of the bugs, but there may be one.
-- Now I just need to see about some optimization
SELECT
n.city,
n.zip_code,
n.latitude,
n.longitude,
3958.75587 * c AS distance
FROM (
SELECT
@anotheremily
anotheremily / find-base64-occurences
Created December 6, 2010 22:25
hackers seem to like base64 encoding their php commands
#!/bin/bash
find . -name "*.php" -exec grep "base64" '{}' \; -print &> b64-detections.txt
find . -name "*.php" -exec grep "eval" '{}' \; -print &> eval-detections.txt
ln -s /usr/lib/liblua5.1.so /usr/lib/liblua.so
Name
Type
Description
Beard Bonus
Paul Buchheit
More Than Just The Gmail Guy
Paul's a CWRU grad. We put him on here to try to get him to give a talk or interview at the CWRU Hacker Society. So, Paul, if you see this please email sj@case.edu!
John McCarthy