Here's how I setup Laravel on MAMP:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
# SnipMate is required to use snippets | |
# Download SnipMate: http://www.vim.org/scripts/script.php?script_id=2540 | |
# Put this file in ~/.vim/snippets/ then restart vim | |
# This snippet file includes many useful snippets for CodeIgniter. Please feel free to fork and contribute! | |
snippet php | |
<?php | |
${1} | |
?> | |
snippet ec | |
echo "${1:string}"${2}; |
{ | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/textmate-tomorrow-theme/Tomorrow-Night.tmTheme", | |
"font_face": "Monaco", | |
"font_size": 12, | |
"ignored_packages": | |
[ | |
], | |
"open_files_in_new_window": false, | |
"theme": "Soda Light.sublime-theme" |
def go_back_url(fallback, text = 'Go Back') | |
url = request.referer.blank? | |
url = fallback if url.blank? | |
link_to text, url, class: 'btn' | |
end |
The following keybindings will allow you to create multiple cursors (above or below the current cursor) with Command + Option + (Up|Down)
. On Windows it would be Control + Alt + (Up|Down)
.
{ "keys": ["super+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["super+alt+down"], "command": "select_lines", "args": {"forward": true} }
[ | |
// Advanced new file | |
{"keys": ["super+alt+shift+n"], "command": "advanced_new_file"}, | |
{"keys": ["super+alt+shift+r"], "command": "advanced_new_file", "args": {"rename": true}}, | |
// Switch casing | |
{ "keys": ["super+k", "super+s"], "command": "swap_case" }, | |
{ "keys": ["super+k", "super+t"], "command": "title_case" }, | |
// Ruby tags |
manifest = File.open('offline.appcache', 'a') | |
manifest.truncate(0) | |
manifest.puts 'CACHE MANIFEST' | |
Dir.glob('*/**/*.*') do |file_name| | |
manifest.puts file_name | |
end |
<? | |
$mb->the_field( 'field_name' ); | |
$content = apply_filters( 'meta_content', html_entity_decode( $mb->get_the_value() ) ); | |
$id = $mb->get_the_name(); | |
$settings = array( | |
'textarea_rows' => 3 | |
); | |
wp_editor( $content, $id, $settings ); |
$postsNavBtn.on('click', function(e) { | |
e.preventDefault(); | |
var $loadMoreBtn = $(this), | |
loadMoreText = $loadMoreBtn.text(); | |
$loadMoreBtn.text('Loading...'); | |
// Append the images to the container | |
$('<div/>').load($loadMoreBtn.attr('href') + ' .main-content', function() { |
$('#element').change(function() { | |
var $this = $(this); | |
if ($this.val() > $this.attr('max')) { | |
$this.val($this.attr('max')); | |
} else if ($this.val() < $this.attr('min')) { | |
$this.val($this.attr('min')); | |
} | |
}); |