I hereby claim:
- I am jarenglover on github.
- I am jaren (https://keybase.io/jaren) on keybase.
- I have a public key ASBhhPt5kR0MDAU_9qexPH0lJQFMH44PkRjHb8V5RyyLjAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
*filter | |
:INPUT DROP [0:0] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [0:0] | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT | |
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT |
# | |
# example Dockerfile for http://docs.docker.com/examples/postgresql_service/ | |
# | |
FROM ubuntu | |
MAINTAINER [email protected] | |
# Add the PostgreSQL PGP key to verify their Debian packages. | |
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc | |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 |
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common | |
sudo apt-get install python-dev | |
sudo apt-get build-dep vim-gnome | |
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev | |
sudo rm -rf /usr/local/share/vim | |
sudo rm /usr/bin/vim |
#!/usr/bin/env bash | |
#run with a user with sudoers privilege | |
#update before apt-get | |
sudo apt-get update | |
#install lua (please note 5.3 was released in 2015) | |
sudo apt-get install lua5.2 liblua5.2 |
# improvement on how to build a dic from a string | |
# -> http://www.jarenglover.com/post/106593630960/creating-iterable-objects | |
# http://stackoverflow.com/questions/988228/converting-a-string-to-dictionary | |
# this only works if you know it will be valued JSON | |
>>> import ast | |
>>> line | |
'{"domain": {}, "buzz": "", "userid": 0.0, "hours": [20.0, 30.0, 40.0, 20.0, 30.0, 40.0, 35.0, 10.0, 0.0, 15.0, 25.0, 30.0, 10.0, 35.0, 30.0, 30.0, 30.0, 40.0, 25.0, 30.0, 35.0, 15.0, 65.0, 20.0], "buzzid": 0.0, "user": "", "time": 15736, "query": {}, "total": 660.0, "type": 0.0}\n' | |
>>> type(line) | |
<type 'str'> |
upstream fuel { | |
# Defines a group of servers. Servers can listen on different ports. | |
server IP:PORT fail_timeout=0; | |
} | |
upstream frontend { | |
server IP:PORT fail_timeout=0; | |
} |
server { | |
listen IP:PORT; | |
server_name .resume.jarenglover.com; | |
access_log /path/to/logs/resume-access.log default_uri; # <- "default_ui" is a parameter for customize Nginx logs | |
error_log /path/to/logs/resume-error.log; | |
index /Resume.pdf; #this sets the index location of what file will be servered | |
root /path/to/resume/; # root folder for this server block | |
location / { |
Python 2.7.6 (default, Sep 9 2014, 15:04:36) | |
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> numbers = '[20.0, 30.0, 40.0, 20.0, 30.0, 40.0, 35.0, 10.0, 0.0, 15.0, 25.0, 30.0, 10.0, 35.0, 30.0, 30.0, 30.0, 40.0, 25.0, 30.0, 35.0, 15.0, 65.0, 20.0]' | |
>>> type(numbers) | |
<type 'str'> | |
>>> numbers.strip(r'[|]') | |
'20.0, 30.0, 40.0, 20.0, 30.0, 40.0, 35.0, 10.0, 0.0, 15.0, 25.0, 30.0, 10.0, 35.0, 30.0, 30.0, 30.0, 40.0, 25.0, 30.0, 35.0, 15.0, 65.0, 20.0' | |
>>> numbers_strip = numbers.strip(r'[]') | |
>>> map(float,numberes_strip.split(',')) |
CREATE TABLE json_test (id SERIAL, data JSON); |