An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Download HSQLDB from its website: [http://hsqldb.org]
Put hsqldb jars into Tomcat library:
cp hsqldb/lib/hsqldb.jar tomcat7/lib/
Edit tomcat7/conf/context.xml
<!-- MessageSource --> | |
<!-- /usr/local/conf/app/messages/messages_en_US.properties --> | |
<beans:bean id="messageSource" | |
class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> | |
<beans:property name="basename"> | |
<beans:value>file:/usr/local/conf/app/messages/messages</beans:value> | |
</beans:property> | |
<beans:property name="cacheSeconds" value="600" /> | |
</beans:bean> |
<project | |
xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mycompany</groupId> | |
<artifactId>localrepodeployer</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0.0</version> |
{ | |
"directory": "components" | |
} |
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.
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) |
# 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 |
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.
/* | |
* 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 |