Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
@SOLUNTECH
SOLUNTECH / Focus.js
Last active August 29, 2015 14:11 — forked from fastcodecoq/Focus.js
(function($){
$.fn.Focus = function(){
$(this).focus();
$(this).attr('autofocus','');
}
$(function(){

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

echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh

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:

#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas