Instantly share code, notes, and snippets.

View documentready.sublime-snippet
<snippet>
<content><![CDATA[
\$(document).ready(function(){
\$( '#button' ).click(function() {
\$(this).toggleClass("show");
});
});
]]></content>
<tabTrigger>documentready</tabTrigger>
</snippet>
View Default (OSX).sublime-keymap
[
{ "keys": ["super+b"], "command": "toggle_side_bar" },
{ "keys": ["f6"], "command": "lower_case" },
{ "keys": ["ctrl+b"], "command": "build" }
]
View copy.sh
rsync -avc --exclude '_assets' --exclude 'conf.php' /Library/WebServer/Documents/* /Volumes/OtherFolder/Clients/_dev/
View apache.sh
# Apache
sudo apachectl start
sudo apachectl stop
sudo apachectl restart
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
$color: tomato;
@for $i from 1 through 10 {
.first-color#{$i} {
color: scale-lightness($color, #{$i}0%);
}
View gulpfile.js
var gulp = require('gulp'),
livereload = require('gulp-livereload');
gulp.task('php', function() {
gulp.src('./*.php')
.pipe(livereload());
});
gulp.task('watch', function() {
View jQuery placeholders
$( "html:lang(es) #form_name" ).attr("placeholder", "Tu nombre");
$( "html:lang(en) #form_name" ).attr("placeholder", "Your name");
View bash alias show hide invisibles files
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
View bash_profile crop fotos
alias cropphotos='
cd ~/Desktop/test-imagenes;
mkdir 300;
cp ~/Desktop/test-imagenes/*.jpg ~/Desktop/test-imagenes/300/;
cd 300;
sips -Z 300 *.jpg;
jpegoptim -m80 --strip-all *.jpg;
declare -i i; i=0; for file in *.jpg; do i=`expr $i+1`; mv "$file" $i-300.jpg; done'
View Gulp: package.json
{
"name": "ceroabsoluto",
"version": "0.92.0",
"description": "Wordpress Framework",
"main": "gulpfile.js",
"dependencies": {
"gulp": "^3.8.11",
"gulp-autoprefixer": "^2.0.0",
"gulp-concat": "^2.4.2",
"gulp-jshint": "^1.9.2",