Skip to content

Instantly share code, notes, and snippets.

View jeffersonsouza's full-sized avatar

Jefferson Souza jeffersonsouza

View GitHub Profile
@jeffersonsouza
jeffersonsouza / gist:bef9ae3bb5b45a7e09a5
Created March 24, 2015 14:43
Android SDK paths - Ubuntu
echo "ANDROID_HOME=~/android-sdk-linux" >> /home/youruser/.bashrc
echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386" >> /home/youruser/.bashrc
echo "PATH=\$PATH:~/android-sdk-linux/tools:~/android-sdk-linux/platform-tools" >> /home/youruser/.bashrc
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@jeffersonsouza
jeffersonsouza / docker.sh
Created May 20, 2015 11:33
Run Docker without sudo
sudo groupadd docker
sudo gpasswd -a ${USER} docker
sudo service docker restart # in some ubuntu versions use "sudo service docker.io restart"
newgrp docker
@jeffersonsouza
jeffersonsouza / nginx.install.sh
Created May 30, 2015 04:15
Nginx Latest Stable on Ubuntu 14.04
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
# print the nginx version
nginx -v
@jeffersonsouza
jeffersonsouza / val
Created June 18, 2015 19:08
Angular Constants
// app.js
'use strict';
angular.module('myApp',['ionic'])
.constant("config", {
"apiUrl": "http://localhost:3000"
});
// seuController.js
angular.module('myApp')
@jeffersonsouza
jeffersonsouza / gulpfile.js
Last active August 29, 2015 14:27
Concat K
/**
* Gulp stuff
*/
gulp.task('css', function () {
gulp.src(paths.sass) // something like a array of scss files [ 'default.scss', 'colors.scss', 'user.scss' ]
.pipe(plugins.sass({errLogToConsole: true}))
.pipe(plugins.minifyCss())
.pipe('concat')
.pipe(gulp.dest('./www/application.min.css'));
server {
listen 80;
server_name yoursite.com;
root /var/www/your-site/public;
index index.php index.html index.htm;
error_log /var/log/nginx/ys_error_log;
location / {
@jeffersonsouza
jeffersonsouza / gist:be44fcfc213d142090ce
Last active September 22, 2015 10:04 — forked from ravenlp/gist:96a66df5dbc1b96afba7
Angular ng-hide fade in/out animation
.fadable {
transition: 0s linear all;
}
.fadable.ng-hide-remove {
opacity: 0;
display: block !important;
transition: 0.5s linear all;
}
.fadable.ng-hide-remove.ng-hide-remove-active {
opacity: .5;
@jeffersonsouza
jeffersonsouza / install.sh
Created October 24, 2015 14:11
Install docker Compose on CoreOS
sudo mkdir /opt/
mkdir /opt/bin
curl -L https://github.com/docker/compose/releases/download/1.4.2/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose