Using JSON in Postgres by example.
- Download and install: Docker Toolbox
- Open Docker Quickstart Terminal
- Start a new postgres container:
docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
Some Jenkinsfile examples |
postgres: | |
image: postgres:9.4 | |
volumes: | |
- ./init.sql:/docker-entrypoint-initdb.d/init.sql |
Using JSON in Postgres by example.
docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
autocomplete="off"
onto <form>
element;<input>
with autocomplete="false"
as a first children element of the form.<form autocomplete="off" method="post" action="">
<input autocomplete="false" name="hidden" type="text" style="display:none;">
...
#!/bin/bash | |
# Automates letsencrypt SSL cert generation/installation on CentOS 7 w/nginx | |
# MIT, use at your own risk blabla | |
[email protected] | |
DOMAIN_NAME=foo.bar.com | |
sudo su - root | |
cd ~ | |
git clone https://github.com/letsencrypt/letsencrypt |
/* | |
* derivative work of Matheus de Oliveira's json_manipulator.sql | |
* https://gist.github.com/matheusoliveira/9488951 | |
* | |
* adapted to support postgresql 9.4 jsonb type | |
* no warranties or guarantees of any kind are implied or offered | |
* | |
* license is as Matheus conferred it on 4/9/2015: | |
* matheusoliveira commented on Apr 9 | |
* @hannes-landeholm, I'd like to take credit if you share them |
This guide sets up a non-clustered Nutch crawler, which stores its data via HBase. We will not learn how to setup Hadoop et al., but just the bare minimum to crawl and index websites on a single machine.
# Install Java 1.8 in CentOS/RHEL 6.X | |
sudo yum remove -y java-1.6.0-openjdk | |
wget --no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.rpm" \ | |
-O jdk-8-linux-x64.rpm | |
sudo rpm -Uvh jdk-8-linux-x64.rpm | |
sudo alternatives --install /usr/bin/java java /usr/java/jdk1.8.0/jre/bin/java 20000 | |
sudo alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0/bin/jar 20000 |
CREATE OR REPLACE FUNCTION public.json_append(data json, insert_data json) | |
RETURNS json | |
IMMUTABLE | |
LANGUAGE sql | |
AS $$ | |
SELECT ('{'||string_agg(to_json(key)||':'||value, ',')||'}')::json | |
FROM ( | |
SELECT * FROM json_each(data) | |
UNION ALL | |
SELECT * FROM json_each(insert_data) |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.