Skip to content

Instantly share code, notes, and snippets.

View miloplacencia's full-sized avatar

Camilo Placencia Ulloa miloplacencia

View GitHub Profile
@miloplacencia
miloplacencia / position_fixed_fix
Created May 7, 2014 00:16
Emulating Position Fixed
/* https://coderwall.com/p/8rz_7g*/
html {
position: absolute;
height: 100%;
overflow: hidden;
}
body {
height: 100%;
overflow: auto;
@miloplacencia
miloplacencia / script.init.js
Last active October 11, 2015 04:28
objeto inicial encapsulado
(function(window,document,$,URL,undefined)
{
var i = {
android : navigator.userAgent.toLowerCase().indexOf('android')!=-1,
ipod : navigator.userAgent.toLowerCase().indexOf('ipod')!=-1,
ipad : navigator.userAgent.toLowerCase().indexOf('ipad')!=-1,
iphone : navigator.userAgent.toLowerCase().indexOf('iphone')!=-1,
isMobile: this.android || this.ipod || this.iphone,
@miloplacencia
miloplacencia / plupload.base.js
Created October 19, 2012 01:08
plupload base
(function($,window,document,undefined)
{
var i = {
plupload : function(seccion,contenedor,botonBuscar,listaUpload,limite)
{
var uploader = new plupload.Uploader({
runtimes : 'gears,html5,flash,silverlight,browserplus',
browse_button : botonBuscar,
container : contenedor,
@miloplacencia
miloplacencia / nginx.conf
Created February 11, 2017 02:39 — forked from atma/nginx.conf
Nginx + nodejs + socket.io websockets
# Add to nginx.conf http section
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
@miloplacencia
miloplacencia / Git push deployment in 7 easy steps.md
Last active March 26, 2017 16:29 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@miloplacencia
miloplacencia / gist:fa6c933a61c574a08c7333a40915d6ba
Created June 17, 2017 20:37 — forked from achiko/gist:9570304
How To Install CouchDB from Source on a CentOS 6 x64 VPS
1 Heloo :)
2 yum update
3 reboot
4 yum localinstall http://epel.mirror.srv.co.ge/6/i386/epel-release-6-8.noarch.rpm
5 uname -rs
6 yum localinstall http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
7 yum update
8 yum install gcc
9 yum install make
@miloplacencia
miloplacencia / gist:8222060b4878e6affdc0b6be5d7a4b85
Created July 18, 2017 17:14 — forked from edwardteach42/gist:4560435
Set Up a CentOS Server on EC2 with Git Deployment

#CentOS Server on EC2 with Git Deployment


##Use Rightscale CentOS Community Server Image ami-09496d4c

###Step 1: SSH into the server and do the following

BE SURE YOU PERFORM THESE ACTIONS AS ROOT OR SU

$ yum update

$ yum install git mysql mysql-libs httpd php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-mcrypt

@miloplacencia
miloplacencia / lazyload.js
Created October 22, 2012 14:39
lazyload.js (c) Lorenzo Giuliani
/* lazyload.js (c) Lorenzo Giuliani
* MIT License (http://www.opensource.org/licenses/mit-license.html)
*
* expects a list of:
* `<img src="blank.gif" data-src="my_image.png" width="600" height="400" class="lazy">`
*/
!function(window){
var $q = function(q, res){
if (document.querySelectorAll) {