CSSを「速く」書くためのSublime Text 2のパッケージ「Hayaku!」について。
Package Controlからどうぞ
| <?php | |
| // PHP Logical operators: The difference between OR vs ||, AND vs && | |
| // Key concept #1: "||" and "&&" have greater precedence than "=", "OR", "AND" | |
| // http://php.net/manual/en/language.operators.precedence.php | |
| // Key concept #2: PHP logical operators are short-circuit | |
| // http://en.wikipedia.org/wiki/Short-circuit_evaluation | |
| // http://php.net/manual/en/language.operators.logical.php |
CSSを「速く」書くためのSublime Text 2のパッケージ「Hayaku!」について。
Package Controlからどうぞ
| { | |
| "bold_folder_labels": true, | |
| // サイドバーのフォルダ名を太字に | |
| "caret_style": "phase", | |
| // キャレットのスタイルを変える。他に「smooth」「blick」「solid」「wide」など | |
| "disable_formatted_linebreak": true, | |
| // Emmetを有効にすると、日本語変換確定後に文字が消えるのを防ぐ | |
| "disabled_single_snippet_for_scopes": "", | |
| // Emmetを有効にすると、HTMLで「php」の展開が「<?php ?>」にならない問題の回避 | |
| "draw_minimap_border": true, |
| /* | |
| * Takes provided URL passed as argument and make screenshots of this page with several viewport sizes. | |
| * These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed | |
| * | |
| * Usage: | |
| * $ casperjs screenshots.js http://example.com | |
| */ | |
| var casper = require("casper").create(); |
| { | |
| "files": | |
| { | |
| "Chart.js": "https://github.com/nnnick/Chart.js", | |
| "Modernizr.js": "http://modernizr.com/downloads/modernizr-latest.js", | |
| "Normalize.css 1.x": "https://github.com/necolas/normalize.css/blob/v1.1.3/normalize.css", | |
| "Normalize.css 2.x": "https://github.com/necolas/normalize.css/blob/v2.1.3/normalize.css", | |
| "Normalize.css 3.x": "https://raw.githubusercontent.com/necolas/normalize.css/master/normalize.css", | |
| "Respond.js": "https://github.com/scottjehl/Respond/blob/master/dest/respond.min.js", | |
| "Sanitize.css": "https://raw.github.com/ZDroid/sanitize.css/master/sanitize.css", |
| #!/usr/bin/php | |
| <?php | |
| switch($argc) { | |
| case 1: | |
| case 2: | |
| echo "please input new site url and wp directory name!\n"; | |
| exit(); | |
| default: | |
| $old_site = isset($argv[3]) ? $argv[3] : ''; | |
| $path = $argv[2]; |
| <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/style.css?ver=<?php echo filemtime(get_template_directory().'/style.css'); ?>" /> | |
| <?php if (is_child_theme()): ?> | |
| <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_stylesheet_directory_uri(); ?>/style.css?ver=<?php echo filemtime(get_stylesheet_directory().'/style.css') ?>" /> | |
| <?php endif; ?> |
| <?php | |
| /* | |
| Usage: | |
| $frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
| if ( !$frag->output() ) { // NOTE, testing for a return of false | |
| functions_that_do_stuff_live(); | |
| these_should_echo(); | |
| // IMPORTANT | |
| $frag->store(); | |
| // YOU CANNOT FORGET THIS. If you do, the site will break. |
| <?php | |
| /* | |
| Plugin Name: R Debug | |
| Description: Set of dump helpers for debug. | |
| Author: Andrey "Rarst" Savchenko | |
| Author URI: https://www.rarst.net/ | |
| License: MIT | |
| */ |