Skip to content

Instantly share code, notes, and snippets.

View cea2k's full-sized avatar

Carlos E. Alarcon cea2k

View GitHub Profile
@cea2k
cea2k / loto.rb
Created August 12, 2011 15:14
Script para Evaluar loto
#!/usr/bin/ruby
$resultados = {
:comodin => 16,
:sorteos => {
:loto => [6,18,21,22,29,34].sort,
:revancha => [2,4,10,18,19,41].sort,
:desquite => [1,7,10,12,27,28].sort,
}
}
@cea2k
cea2k / php_cgi
Created October 26, 2011 21:59
spawn-fcgi init.d shell script
#!/bin/sh
#
# php-cgi - php-fastcgi swaping via spawn-fcgi
#
# chkconfig: - 85 15
# description: Run php-cgi as app server
# processname: php-cgi
# config: /etc/sysconfig/phpfastcgi (defaults RH style)
# pidfile: /var/run/php_cgi.pid
# Note: See how to use this script :
@cea2k
cea2k / nginx-server
Created December 21, 2011 03:57
script nginx-server
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: 2345 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /usr/local/nginx/conf/nginx.conf
# pidfile: /usr/local/nginx/logs/nginx.pid
@cea2k
cea2k / gist:1621165
Created January 16, 2012 14:40 — forked from dx7/gist:1333785
Installing ruby-debug with ruby-1.9.3-p0
# Install with:
# bash < <(curl -L https://raw.github.com/gist/1333785)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
echo "Installing ruby-debug with ruby-1.9.3-p0 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
@cea2k
cea2k / track_spree
Created February 14, 2012 13:02
TRACKS CHANGES TO PARTS OF SPREE SINCE A GIVEN COMMIT
#!/usr/bin/env zsh
# 1304046900 TRACKS CHANGES TO PARTS OF SPREE SINCE A GIVEN COMMIT
# To be placed at the root of your app.
old_commit="29e3d4f707bdb047a6fabc2543247139027b06fb"
parts=(
core/app/views
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
import React, {
Dispatch,
ComponentType,
createContext,
FunctionComponent,
useContext,
useState,
} from 'react';
import { AppAction, AppState, AppContext } from './types';
We can't make this file beautiful and searchable because it's too large.
ELECCIÓN,REGION,TERRITORIO ELECTORAL,"RUN CANDIDATO",DVC,NOMBRE DEL CANDIDATO,AFILIACIÓN,NOMBRE PARTIDO,"RUT O RUN DEL APORTANTE",DVA,NOMBRE APORTANTE,"FECHA DOCUMENTO","TIPO DOCUMENTO",DESCRIPCIÓN T/D,"TIPO CUENTA",DESCRIPCIÓN T/C,"NÚMERO DOCUMENTO",GLOSA DOCUMENTO,MONTO
PRESIDENTE,NACIONAL,NACIONAL,"8,510,034",3,ALEJANDRO NAVARRO BRAIN,Afiliado,PARTIDO PAIS,"8,510,034",3,ALEJANDRO NAVARRO BRAIN,10/6/2017,OI,Otros Documentos de Ingresos,110,Aporte personal del candidato,7734,PROPIO,"20,000,000"
PRESIDENTE,NACIONAL,NACIONAL,"8,510,034",3,ALEJANDRO NAVARRO BRAIN,Afiliado,PARTIDO PAIS,"8,510,034",3,ALEJANDRO NAVARRO BRAIN,11/6/2017,OI,Otros Documentos de Ingresos,110,Aporte personal del candidato,18205,PROPIO,"6,000,000"
PRESIDENTE,NACIONAL,NACIONAL,"8,510,034",3,ALEJANDRO NAVARRO BRAIN,Afiliado,PARTIDO PAIS,"8,510,034",3,ALEJANDRO NAVARRO BRAIN,11/9/2017,OI,Otros Documentos de Ingresos,110,Aporte personal del candidato,19707,PROPIO,"20,000,000"