This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| " Name: antares.vim | |
| " Version: 0.r1 | |
| " Maintainer: <https://github.com/wilburhimself> | |
| set background=dark | |
| if version > 580 | |
| highlight clear " reset syntax highlighting system to default state | |
| if exists("syntax_on") |
| function template(string, options) { | |
| var delimeters = { | |
| open: "*(", | |
| close: ")*" | |
| }; | |
| var templateString = []; | |
| var i = 1; | |
| var closingDelimterLocation = 0; | |
| var functionArguments = []; |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| { | |
| "use_simple_full_screen": false, | |
| // calculates indentation automatically when pressing enter | |
| "auto_indent": true, | |
| // sets the colors used within the text area (default) | |
| // see https://github.com/olivierlacan/monokaim to download | |
| // the customized Monokai I use. | |
| "color_scheme": "Packages/Color Scheme - Default/Monokaim.tmTheme", |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>FullScreen API</title> | |
| <meta charset="utf-8" /> | |
| </head> | |
| <body> | |
| <h3>Click en las opciones para activar/desactivar el modo FullScreen</h3> |
| <?php | |
| function phptemplate_preprocess_page(&$vars) { | |
| if (module_exists('path')) { | |
| $alias = drupal_get_path_alias(str_replace('/edit', '', $_GET['q'])); | |
| if ($alias != $_GET['q']) { | |
| $template_filename = 'page'; | |
| foreach (explode('/', $alias) as $path_part) { | |
| $template_filename = $template_filename . '__' . $path_part; | |
| $vars['theme_hook_suggestions'][] = $template_filename; | |
| } |
| <?php | |
| function phptemplate_preprocess_page(&$vars) { | |
| if (module_exists('path')) { | |
| $alias = drupal_get_path_alias(str_replace('/edit','',$_GET['q'])); | |
| if ($alias != $_GET['q']) { | |
| $template_filename = 'page'; | |
| foreach (explode('/', $alias) as $path_part) { | |
| $template_filename = $template_filename . '-' . $path_part; | |
| $vars['template_files'][] = $template_filename; | |
| } |
| .bg(@filename, @repeat: 'no-repeat', @left: '0px', @top: '0px') { | |
| background: e(%('url(http://REPLACE WITH THE ABSOLUTE URL OF YOUR IMAGES FOLDER/%s) %s %s %s', @filename, @repeat, @left, @top)); | |
| } | |
| /* | |
| USAGE: | |
| Assuming the background image file is bg.png and the ABSOLUTE URL for our images folder is http://example.com/images this mixing can be used in a declaration like: | |
| .bg("bg.png", "repeat-x"); |
| <?php | |
| function get_posts_from_category($atts) { | |
| extract(shortcode_atts(array( | |
| 'category' => '', | |
| 'num' => 5, | |
| ))); | |
| $posts = get_posts('category_name='.$category.'numberposts='.$num); | |
| $output = '<ul>'; | |
| foreach ($posts as $post) { | |
| setup_postdata($post); |
| RewriteEngine on | |
| RewriteCond $1 !^(index\.php|favicon.ico|robots\.txt) | |
| RewriteRule ^(.*)$ index.php?/$1 [L] |