Skip to content

Instantly share code, notes, and snippets.

View panchicore's full-sized avatar
👽

Luis Pallares panchicore

👽
View GitHub Profile
@panchicore
panchicore / ec2.py
Created April 11, 2011 13:33 — forked from ingenieroariel/ec2.py
deploy geonode
# easy_install boto
# You will also need:
# - A .pem keyfile generated using the Amazon web interface to create new instances
# - The secret and access keys created from the
# The only pre-reqs are having created a keypair (.pem file)
# via the amazon web interface and knowing the AWS key and secret
#
# Usage:
# export AWS_ACCESS_KEY_ID='blahblah'
# export AWS_SECRET_ACCESS_KEY='blebleble'
@panchicore
panchicore / geodjango: ubuntu: postgresql 9 - postgis 1.5
Created April 12, 2011 22:24
to run geodjango in ubuntu (10.04 tested)
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:pitti/postgresql
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
@panchicore
panchicore / 1. OSsecurity
Last active May 16, 2021 12:00
Barebones Server Setups from Scratch (this is working 100% OK in Ubuntu servers 10.04) )
Barebones Server Setup
Current Linux Distro: Ubuntu 10.04 LTS
###
Optional:
or UPDATE distro in /etc/apt/sources.list run apt-get update and apt-get dist-upgrade
solve perl: warning: Setting locale failed.
https://gist.github.com/panchicore/1269109
@panchicore
panchicore / commands
Created August 3, 2011 15:03
setup postgis on OSX 64-bits
#Download and install XCode
#Install homebrew (package manager) IF INSTALLED: just update it
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
#Install git
brew install git
#IF LION
sudo vi /etc/paths and move /usr/local/bin to the top, cuz LION comes with a specific osx restricted PG.
@panchicore
panchicore / Comment.java
Created September 12, 2011 22:19
Try to use Java Reslet Framework with json served by python/django
import java.io.Serializable;
public class Comment implements Serializable{
private static final long serialVersionUID = 1L;
private String comment;
private String date;
private String date_since;
private int id;
private String resource_uri;
@panchicore
panchicore / bash
Created October 7, 2011 00:25
solve perl: warning: Setting locale failed.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
@panchicore
panchicore / request.xml
Created March 22, 2012 16:53
cotizador tests
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:wcf="http://schemas.datacontract.org/2004/07/WcfsCotVeh.msg">
<soapenv:Header/>
<soapenv:Body>
<tem:CotVeh>
<!--Optional:-->
<tem:parMsgRq>
<!--Optional:-->
<wcf:Celular>3008035134</wcf:Celular>
<!--Optional:-->
<wcf:CodigoFasecolda>00801228</wcf:CodigoFasecolda>
@panchicore
panchicore / mr_keyword_count.js
Created August 14, 2012 19:31
my map reduces
m = function(){
kws = this.params.marketing_keyword;
if(kws != undefined){
words= kws.replace('+', ' ').split(' ');
for(w in words){
emit({word:words[w]}, {count:1});
}
}
};
@panchicore
panchicore / d.sh
Created September 3, 2012 17:12
python-distribute problem on mountain lion
wget http://python-distribute.org/distribute_setup.py
python distribute_setup.py
missing wget?
brew install wget
@panchicore
panchicore / description.txt
Created October 17, 2012 17:28
AWS django AMI running on Ubuntu Server 12.04.1 LTS
os: Ubuntu Server 12.04.1 LTS
user: ubuntu
python: 2.7
webserver: nginx 1.2.4 enabled with: https, geoip, google performance tools, gzip
virtualenv demo: django-sample-app (virtualenvwrapper ready)
apps dir: /home/ubuntu/www/ (demo is a fresh django 1.4.1 project)
supervisor config: /etc/supervisor.conf (uwsgi ready)
security: open ports: 80, 443
other: git ready
access: http://ec2-54-242-155-157.compute-1.amazonaws.com/