-
Add
pygments_global_config.rbtomy-jekyll-project/_plugins/. -
Add Pygments options to
_config.yml
markdown: redcarpet| 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 |
| // 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 | |
| */ |
| <?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'); |
| /*! normalize-all-you-really-need-tho.css v1.0.0 | MIT License */ | |
| html { | |
| font-family: sans-serif; /* 1 */ | |
| -webkit-text-size-adjust: 100%; /* 2 */ | |
| -ms-text-size-adjust: 100%; /* 2 */ | |
| } | |
| body { | |
| margin: 0; |
| <?php | |
| // Esse é o arquivo com a base das funções. | |
| // Tente não alterar ele. | |
| /** | |
| * Theme Options Functions | |
| */ | |
| /** | |
| * Load options scripts |
| /* Minifies HTML and removes comments (except IE tags and comments within script tags) | |
| * | |
| * To disable compression of code portions, use '<!--wp-html-compression no compression-->' tag | |
| * | |
| * @see http://forrst.com/posts/Wordpress_Minify_output_HTML-29q | |
| * @see http://www.intert3chmedia.net/2011/12/minify-html-javascript-css-without.html | |
| */ | |
| class WP_HTML_Compression | |
| { | |
| // Settings |
| <?php | |
| /* | |
| Adicionar metabox à páginas específicas | |
| */ | |
| function my_meta_setup_1() { | |
| // criação da metabox | |
| } | |
| function especific_metabox_pages() { | |
| $post_ID = $_GET['post'] ? $_GET['post'] : $_POST['post_ID']; |
| # A sample Gemfile | |
| source 'https://rubygems.org' | |
| gem 'aws-sdk' | |
| gem 'pit' |
| /** | |
| * Create Custom Meta Boxes for WooCommerce Product CPT | |
| * | |
| * Using Custom Metaboxes and Fields for WordPress library from | |
| * Andrew Norcross, Jared Atchinson, and Bill Erickson | |
| * | |
| * @link http://blackhillswebworks.com/?p=5453 | |
| * @link https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress | |
| */ | |