Skip to content

Instantly share code, notes, and snippets.

View hpcorona's full-sized avatar

Hilario Pérez Corona hpcorona

  • Google
  • Washington
View GitHub Profile
# Easily install vim plugins from a source control checkout (e.g. Github)
#
# alias vim-install=rake -f ~/.vim/rakefile-vim-install
# vim-install
# vim-install uninstall
require 'ftools'
require 'fileutils'
task :default => :install
@hpcorona
hpcorona / local_nginx_play
Last active August 29, 2015 14:23
Local Nginx Play Configuration
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@hpcorona
hpcorona / upstart_play.conf
Last active August 29, 2015 14:22
Play Application Upstart
description "Play Upstart Application"
version "1.0"
env HOME=/path/to/app
env APP=appname
env USER=user
env GROUP=group
env PORT=9000
@hpcorona
hpcorona / nginx_play
Last active December 10, 2015 20:03
Nginx Configuration for HTTP
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
#!/bin/bash
OPENSSL_VERSION="1.0.2a"
curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_i386
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_x86_64
cd openssl_i386
@hpcorona
hpcorona / nginx_https_play
Last active August 29, 2015 14:16
Nginx Configuration for HTTPS for Play!
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 443;
server_name www.server.com;
@hpcorona
hpcorona / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@hpcorona
hpcorona / cove_cadena_original.xslt
Created August 13, 2014 19:02
Genera la cadena original de los diferentes comprobantes que se encuentran en un XML listo para ser enviado por WebService. No es necesario quitar los prefijos. Genera 1 cadena original por linea (separado por enters) por cada comprobante
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:oxml="http://www.ventanillaunica.gob.mx/cove/ws/oxml/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="wsse:Security"></xsl:template>
@hpcorona
hpcorona / create_user.sh
Created April 25, 2014 18:21
create a user in a ubuntu server
sudo useradd -m -d /home/$1 -s /bin/bash -U $1
# Next, we're going to add our user to the admin group to grant superuser privileges:
groupadd admin && usermod -a -G admin $1
#passwd $1
@hpcorona
hpcorona / goppcast.conf
Last active August 29, 2015 14:00
goppcast.conf
# goppcast
description "Goppcast app"
start on starting rc-sysinit
#start on started rc RUNLEVEL=[2345]
#stop on stopping network
script
cd /path/to/goppcast