Skip to content

Instantly share code, notes, and snippets.

@SOLUNTECH
SOLUNTECH / mongodb.conf
Created November 6, 2014 19:40
Secured mongodb.conf template
# mongodb.conf
# Where to store the data.
dbpath=/var/lib/mongodb
#where to log
logpath=/var/log/mongodb/mongodb.log
logappend=true
@SOLUNTECH
SOLUNTECH / apache.site.conf
Last active August 29, 2015 14:08
Proxy reverse
<VirtualHost 109.74.199.47:80>
ServerAdmin davy.brion@thatextramile.be
ServerName thatextramile.be
ServerAlias www.thatextramile.be
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
#############################################
# 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

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:

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

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

@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(){
#!/bin/sh
# Ubuntu Developer Script For Ionic Framework
# Created by Nic Raboy
# http://www.nraboy.com
#
#
# Downloads and configures the following:
#
# Java JDK
# Apache Ant
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /home/gomosoft/app/front;
index index.html index.php index.htm;
# server_name server_domain_name_or_IP;
location / {
<!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">