Skip to content

Instantly share code, notes, and snippets.

@joliveras
joliveras / Default (OSX).sublime-keymap
Last active April 18, 2018 11:28
Preferencias de sublime
[
{ "keys": ["super+b"], "command": "toggle_side_bar" },
{ "keys": ["f6"], "command": "lower_case" },
{ "keys": ["ctrl+b"], "command": "build" }
]
@joliveras
joliveras / documentready.sublime-snippet
Last active March 10, 2016 14:25
Show me the money !
<snippet>
<content><![CDATA[
\$(document).ready(function(){
\$( '#button' ).click(function() {
\$(this).toggleClass("show");
});
});
]]></content>
<tabTrigger>documentready</tabTrigger>
</snippet>
@joliveras
joliveras / copy.sh
Created January 7, 2016 11:42
Copy files from terminal
rsync -avc --exclude '_assets' --exclude 'conf.php' /Library/WebServer/Documents/* /Volumes/OtherFolder/Clients/_dev/
@joliveras
joliveras / bash_profile crop fotos
Last active January 7, 2016 11:35
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'
# Apache
sudo apachectl start
sudo apachectl stop
sudo apachectl restart
@joliveras
joliveras / gulpfile.js
Last active January 7, 2016 11:32
testLivereload
var gulp = require('gulp'),
livereload = require('gulp-livereload');
gulp.task('php', function() {
gulp.src('./*.php')
.pipe(livereload());
});
gulp.task('watch', function() {
@joliveras
joliveras / SassMeister-input.scss
Created December 11, 2015 14:13
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$color: tomato;
@for $i from 1 through 10 {
.first-color#{$i} {
color: scale-lightness($color, #{$i}0%);
}
@joliveras
joliveras / HTML: Basic Template
Last active October 22, 2015 11:41
HTML: Basic Template
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8" />
<title>Page Title</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="">
@joliveras
joliveras / jQuery placeholders
Last active October 22, 2015 08:45
Añadir placeholders mediante jQuery
$( "html:lang(es) #form_name" ).attr("placeholder", "Tu nombre");
$( "html:lang(en) #form_name" ).attr("placeholder", "Your name");
@joliveras
joliveras / bash alias show hide invisibles files
Last active August 29, 2015 14:22
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'