Skip to content

Instantly share code, notes, and snippets.

View juanpasolano's full-sized avatar
💻
Making

Juan Pablo Solano juanpasolano

💻
Making
View GitHub Profile
# update pacakges
sudo apt-get update
####################
# Add the Node.js maintained repositories to your Ubuntu package source list, this will ensure latest stable version
curl -sL https://deb.nodesource.com/setup | sudo bash -
# Install nodejs with apt-get (the -y flag will accept any question)
sudo apt-get install nodejs -y
@juanpasolano
juanpasolano / es.sh
Created November 5, 2015 05:50 — forked from Globegitter/es.sh
Easy install for elasticsearch on Ubuntu 14.04
cd ~
##If you want to install OpenJDK
#sudo apt-get update
#sudo apt-get install openjdk-8-jre-headless -y
###Or if you want to install Oracle JDK, which seems to have slightly better performance
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@juanpasolano
juanpasolano / gist:4722766
Last active December 12, 2015 05:38
html: new Document
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie7"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie8"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=1024, maximum-scale=2" />
<title></title>
@juanpasolano
juanpasolano / gist:4722768
Last active December 12, 2015 05:38
CSS: clearfix
.clearfix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
@juanpasolano
juanpasolano / gist:4770804
Last active December 12, 2015 12:19
CSS: attribute selectors
li[class~='red'] {} /*Selects all li that have the class red and other classes*/
li[class|='red'] {} /*Selects li that have hyphen separeted values, ie: 'red-button', 'red-external'*/
li[class*='red'] {} /*selects all li that have the a class tat has red in it ie: 'ared', 'redid', 'xxxxxred'*/
li[class^='red'] {} /*Selects all li which class starts with 'red', ie: 'redid', 'redxxx'*/
li[class$='red'] {} /*selects li which class ends with value 'red', ie: 'xxxred', 'ared'*/
@juanpasolano
juanpasolano / gist:5103886
Created March 6, 2013 22:46
brackets higlight for theme in sublime text
<!-- Brackets highligut -->
<dict>
<key>name</key>
<string>Bracket all</string>
<key>scope</key>
<string>bracket.all</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#ff0000</string>
@juanpasolano
juanpasolano / gist:6442597
Last active December 22, 2015 08:08
Serialize Object: extends jquery
/*
|-----------------------------------------------------------------------------
| Serialize Object
|-----------------------------------------------------------------------------
*/
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
@juanpasolano
juanpasolano / gist:6442610
Last active December 22, 2015 08:08
Object dumbp funciton for debuggin in android or others where console.log is not enough
window.ObjectDump = function(obj, name) {
this.result = "[ " + name + " ]\n";
this.indent = 0;
this.dumpLayer = function(obj) {
this.indent += 2;
for (var i in obj) {
if(typeof(obj[i]) == "object") {
this.result += "\n" +
@juanpasolano
juanpasolano / gist:6630996
Last active December 23, 2015 11:49
Fetch file for sublime
{
"files":
{
"jquery": "http://code.jquery.com/jquery.min.js",
"moment+langs.min" : "https://rawgithub.com/moment/moment/2.2.1/min/moment+langs.min.js",
"Bootstrap-2.3.3-combined.css" : "http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css",
"Bootstrap-2.3.3.js": "http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"
},
"packages":
{
@juanpasolano
juanpasolano / gist:8384599
Last active January 3, 2016 00:39
Less mixins
.placeholder (@color){
&::-webkit-input-placeholder { color: @color }
&:-moz-placeholder {color: @color }
&::-moz-placeholder {color: @color }
&:-ms-input-placeholder {color: @color }
}
.text-shadow (@string: 0 1px 3px rgba(0, 0, 0, 0.25)) {
text-shadow: @string;
}
.box-shadow (@string) {