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 |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<title></title> | |
</head> | |
<body> | |
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 |
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<meta name="description" content=""> |
/** | |
* Assume we want to check the placeholder HTML5 feature support in input element. | |
* Credit should go to Daniel Stocks, I found this on his placeholder plugin | |
* (https://github.com/danielstocks/jQuery-Placeholder/blob/master/jquery.placeholder.js#L71) | |
*/ | |
var NATIVE_SUPPORT = !!("placeholder" in document.createElement( "input" )); | |
/** | |
* Assume we want to check for HTML5 cavas support. |
(function() { | |
var script, | |
scripts = document.getElementsByTagName('script')[0]; | |
function load(url) { | |
script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); |
//check for video URL | |
/* http://lasnv.net/foro/839/Javascript_parsear_URL_de_YouTube */ | |
var video_id_regExp = /^.*((youtu.be\/|vimeo.com\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/, | |
match = url.match(video_id_regExp), | |
video_id; | |
if (match&&match[7]){ | |
//valid |
#Javascript Scaffold Template
##Instructions
Replace PN
with Project Name Abbrivation.
Make it Simple and CAP, and make sure it doesn't be longer than 3 Characters.
Replace page-name
with Page Name (Obviously!). Make it simple and understandable.
##PhpStrom/WebStrom Template
Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.
####Search, Go to, Navigation ####
Cmd + P - Search file
Cmd + Shift + O - Search everywhere
(I swapped the above two recently because I use Cmd + P to search for files most of the time).
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |