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
| <?php | |
| if(isset($_POST['zipcode']) && is_numeric($_POST['zipcode'])){ | |
| $zipcode = $_POST['zipcode']; | |
| }else{ | |
| $zipcode = '50644'; | |
| } | |
| $result = file_get_contents('http://weather.yahooapis.com/forecastrss?p=' . $zipcode . '&u=f'); | |
| $xml = simplexml_load_string($result); | |
| //echo htmlspecialchars($result, ENT_QUOTES, 'UTF-8'); |
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
| // This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.github.io | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
| */ |
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
| rails generate model Modelname attr1:string attr2:integer | |
| rails destroy model Modelname | |
| rails generate migration add_user_id_to_posts user_id:integer | |
| /* Delete and re-create */ | |
| rake db:drop | |
| rake db:create | |
| rake db:migrate | |
| rake db:reset |
NewerOlder