This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getDays($day = 0) { | |
| $numDays = 31; | |
| $x = 1; | |
| $output = '<option value="">DD</option>' . "\n"; | |
| while ($x <= $numDays) { | |
| if($x < 10) { $x = "0".$x; } | |
| $output .= '<option '; | |
| if($day == $x) { $output .= 'selected="selected"'; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getMonths($month = 0) { | |
| $numMonths = 12; | |
| $x = 1; | |
| $output = '<option value="">MM</option>' . "\n"; | |
| while ($x <= $numMonths) { | |
| if($x < 10) { $x = "0".$x; } | |
| $output .= '<option '; | |
| if($month == $x) { $output .= 'selected="selected"'; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getYears($past = 99, $future = 0, $year = 0) { | |
| $yr = date("Y") + $future; | |
| $numYearSub = $past + $future; | |
| $x = 0; | |
| $output = '<option value="">YYYY</option>' . "\n"; | |
| while ($x <= $numYearSub) { | |
| $output .= '<option '; | |
| if($year == $yr) { $output .= 'selected="selected"'; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getStates($state) { | |
| $stateList = array("AL"=>"Alabama","AZ"=>"Arizona","AR"=>"Arkansas","CA"=>"California","CO"=>"Colorado","CT"=>"Connecticut","DC"=>"District of Columbia","DE"=>"Delaware","FL"=>"Florida","GA"=>"Georgia","ID"=>"Idaho","IL"=>"Illinois","IN"=>"Indiana","IA"=>"Iowa","KS"=>"Kansas","KY"=>"Kentucky","LA"=>"Louisiana","ME"=>"Maine","MD"=>"Maryland","MA"=>"Massachusetts","MI"=>"Michigan","MN"=>"Minnesota","MS"=>"Mississippi","MO"=>"Missouri","MT"=>"Montana","NE"=>"Nebraska","NV"=>"Nevada","NH"=>"New Hampshire","NJ"=>"New Jersey","NM"=>"New Mexico","NY"=>"New York","NC"=>"North Carolina","ND"=>"North Dakota","OH"=>"Ohio","OK"=>"Oklahoma","OR"=>"Oregon","PA"=>"Pennsylvania","RI"=>"Rhode Island","SC"=>"South Carolina","SD"=>"South Dakota","TN"=>"Tennessee","TX"=>"Texas","UT"=>"Utah","VT"=>"Vermont","VI"=>"Virgin Islands","VA"=>"Virginia","WA"=>"Washington","WV"=>"West Virginia","WI"=>"Wisconsin","WY"=>"Wyoming"); | |
| // $stateList = array("AL"=>"AL","AZ"=>"AZ","AR"=>"AR","CA"=>"CA","CO"=>"CO" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -name ".svn" -exec rm -rf '{}' \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python -c 'print "<policy-file-request/>%c" % 0' | nc xxx.xxx.xxx.xxx 843 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * connects mongo shell to the primary node of a replica set | |
| * without first knowing the primary node ip | |
| * | |
| * note: authentication is optional; based on configuration | |
| * | |
| * @[replicaset-name] | |
| * name of the replica set | |
| * | |
| * @[node-ip] |