Skip to content

Instantly share code, notes, and snippets.

View fastcodecoq's full-sized avatar

Fastcode fastcodecoq

View GitHub Profile

SIMPLE PUSH

Con este shell script simplificaremos el proceso para hacer un push a nuestros repos Git.

Nota: Se asume que se tiene un repositorio Git previamente configurado.

USO

Remover PHP5 completamente

$ sudo apt-get remove php5
$ sudo apt-get -y purge php.*

Remover Nginx completamente

(function($,w){
$(function(){
var $w = $(w).width();
var $h = $(w).height();
var vEngine = {
render : function(){
(function($){
$.fn.Focus = function(){
$(this).focus();
$(this).attr('autofocus','');
}
$(function(){

Gomosoft

Como actualizar a partir del repo master nuestro repo forked

A continuación configuraremos nuestro repositorio local, para que este tenga la habilidad de actualizarce desde dos origenes (origin/master y upstream/master):

origin/master: es nuestro repositorio forked en github. upstream/master: es el repositorio master al cual le hemos hecho fork

@fastcodecoq
fastcodecoq / BOOT_NODE.md
Last active October 15, 2018 17:33
Iniciar una aplicaciones Node.js en el arranque de un servidor. (UBUNTU / DEBIAN)

Iniciar apps Node.js en el arranque de nuestro servidor.

Con unos simples pasos lograremos hacer que nuestras apps Node.js se inicien en cada arranque de nuestro servidor:

  1. Logueate en tu servidor y accede a la carpeta /etc/init.d

> $ cd /etc/init.d

@fastcodecoq
fastcodecoq / AUTODEPLOY.md
Last active June 18, 2024 22:03
Con este código vamos a hacer un autodespliegue de Código desde Github, cuando halla un PUSH a un repositorio.

Gomosoft

AUTO DESPLIEGUE DE CODIGO DESDE GITHUB

Con este pequeño código haremos un autodespliegue de nuestro repositorio en nuestro servidor. Debemos tener instalando Node.js con Npm (Instalar nodejs y npm), también es necesario GIT (Instalar Git) previamente. Luego podemos seguir con las instruciones.

Instruciones:

@fastcodecoq
fastcodecoq / desplegar.sh
Last active August 29, 2015 14:09
Shell Script para desplegar una máquina funcional en Ubuntu Server o Debian.
#!/bin/sh
echo 'Desplegando máquina'
cd /etc
sudo apt-get install nginx
sudo apt-get install mysql-server
sudo apt-get install mysql_secure_installation
sudo apt-get install php5 php-pear php5-fpm php5-mysql php5-dev
echo 'cgi.fix_pathinfo=0' >> php5/fpm/php.ini
sudo service php5-fpm restart
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
// String cuando_paso
// params
// int time <tiempo unix>
function cuando_paso (time)
{
var time = Math.floor( (new Date().getTime() / 1000) - Math.floor(time / 1000)); // obtenemos el tiempo actual
var tiempos = {