Skip to content

Instantly share code, notes, and snippets.

View juanpasolano's full-sized avatar
💻
Making

Juan Pablo Solano juanpasolano

💻
Making
View GitHub Profile
@juanpasolano
juanpasolano / gist:8722023
Created January 30, 2014 23:04
Spacers with less
.spacer (@index) when (@index > 0) {
.spacer-@{index} {
width: 100%;
height: 10px*@index;
}
.spacer(@index - 1);
}
.spacer(8);
@juanpasolano
juanpasolano / gist:9609355
Created March 17, 2014 22:05
ng-cloak css
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
@juanpasolano
juanpasolano / gist:9612438
Created March 18, 2014 02:20
Flat colors for less
/*from http://flatuicolors.com/*/
@turquoise:#1abc9c;
@greensea:#16a085;
@emerald:#2ecc71;
@nephritis:#27ae60;
@peterriver:#3498db;
@belizehole:#3498db;
@amethyst:#3498db;
@wisteria:#8e44ad;
@wetasphalt:#34495e;
@juanpasolano
juanpasolano / jsbin.cevaz.html
Created March 21, 2014 22:50
Send data from local sails to remote
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-git2.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script>
@juanpasolano
juanpasolano / Gruntfile.js
Created March 23, 2014 02:13
Basic grunt
module.exports = function (grunt) {
grunt.initConfig({
watch: {
less: {
files: ['www/css/less/*.less'],
tasks: ['less', 'notify:less']
}
},
@juanpasolano
juanpasolano / gist:9900723
Created March 31, 2014 19:50
Detect mobile javascript
function detectmob() {
if( navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/iPod/i)
|| navigator.userAgent.match(/BlackBerry/i)
|| navigator.userAgent.match(/Windows Phone/i)
){
return true;
@juanpasolano
juanpasolano / gist:9978052
Created April 4, 2014 16:20
Google maps fix
/*This fixes google maps funcky css*/
img[src*="gstatic.com/"], img[src*="googleapis.com/"] {
max-width: 99999px;
}
@juanpasolano
juanpasolano / runVet.sh
Last active August 29, 2015 14:13
Run the vet enviroment
confirm () {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure? [y/N]} " response
case $response in
[yY][eE][sS]|[yY])
true
;;
@juanpasolano
juanpasolano / Docker.sh
Last active August 29, 2015 14:26
Docker stuff
# Install docker
wget -qO- https://get.docker.com | sh
# Add user to the docker group (restart the server after)
sudo usermod -aG docker <user>
# Run docker container and login
# The -i flag tells docker container to connect to STDIN on the container
# The -t flag specifies to get a pseudo-terminal
vagrant box add hashicorp/precise32
vagrant init hashicorp/precise32
vagrant up
vagrant ssh