Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| /************* ADD FEATURE IMAGES TO RSS FEED *****************/ | |
| function featured_image_in_feed( $content ) { | |
| global $post; | |
| if( is_feed() ) { | |
| if ( has_post_thumbnail( $post->ID ) ){ | |
| $output = get_the_post_thumbnail( $post->ID, 'large', array( 'style' => 'float:right; margin:0 0 10px 10px;' ) ); | |
| $content = $output . $content; | |
| } | |
| } |
| <link rel="shortcut icon" href="http://www.yoursite.com/favicon.ico?v=2" /> |
| /* For use on localhost only. */ | |
| if($_SERVER['SERVER_NAME'] != 'http://site.com') { | |
| define('WP_SITEURL' , 'http://' . $_SERVER['SERVER_NAME']); | |
| define('WP_HOME' , 'http://' . $_SERVER['SERVER_NAME']); | |
| define('WP_CONTENT_DIR', dirname( __FILE__ ) . '/wp-content'); | |
| define('WP_CONTENT_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp-content'); | |
| } |
| //jQuery Insert From Google | |
| if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11); | |
| function my_jquery_enqueue() { | |
| wp_deregister_script('jquery'); | |
| wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js", false, null); | |
| wp_enqueue_script('jquery'); | |
| } |
| echo -n `cat logo.svg` | base64 | pbcopy | |
| openssl base64 < path/to/file.png | tr -d '\n' | pbcopy | |
| # Skip writing the file and just copy the base64 | |
| cat path/to/file.png | openssl base64 | tr -d '\n' | pbcopy | |
| In Sublime Text w/ Emmet: | |
| - place cursor in file url | |
| - control + shift + d |
| # Fix page validation by adding X-UA-Compatible here | |
| <FilesMatch "\.(htm|html|php)$"> | |
| <IfModule mod_headers.c> | |
| BrowserMatch MSIE ie | |
| Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie | |
| </IfModule> | |
| </FilesMatch> |
| { | |
| "Version": "2012-10-17", | |
| "Id": "http referer policy example", | |
| "Statement": [ | |
| { | |
| "Sid": "Allow get requests referred by www.mysite.com and mysite.com", | |
| "Effect": "Allow", | |
| "Principal": "*", | |
| "Action": "s3:GetObject", | |
| "Resource": "arn:aws:s3:::examplebucket/*", |
| p { | |
| background: -webkit-linear-gradient(top,#fd0b58 0,#a32b68 100%); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| } |