$ wrk -t12 -c400 -d2s http://127.0.0.1:8080
Running 2s test @ http://127.0.0.1:8080
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.71ms 3.16ms 23.05ms 69.17%
Req/Sec 3.44k 1.98k 7.80k 58.22%
63697 requests in 2.00s, 17.86MB read
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# hhvm Startup script for the HipHop Server | |
# | |
# chkconfig: - 85 15 | |
# description: HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP | |
# processname: hhvm | |
# config: /etc/php.ini | |
# config: /etc/hhvm/server.ini | |
# pidfile: /var/run/hhvm/hhvm.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Eval { | |
Jit = true | |
JitASize = 67108864 | |
JitAStubsSize = 67108864 | |
JitGlobalDataSize = 22554432 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wget http://www.hop5.in/yum/el6/hop5.repo | |
$ yum install hhvm | |
// libwarf が無いよって怒られる | |
$ yum install libdwarf --enablerepo=epel | |
$ yum install hhvm | |
$ hhvm | |
// liblcms2.so.2が無いよって怒られる |
NDK (Native Develop Toolkit) is a toolchain from Android official, originally for users who writes native C/C++ code as JNI library. It's not designed for compiling standalone programs (./a.out) and not compatible with automake/cmake etc.
"Standalone" refers to two meanings:
- The program is standalone (has nothing connect to NDK, and don't need helper scripts to run it)
- The toolchain is made for building standalone programs and libs, and which can used by automake etc.
By default, NDK uses android flavor directory structure when it's finding headers and libs, which is different from GNU flavor, so the compiler cannot find them. For Example:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"math" | |
) | |
func Round(val float64, roundOn float64, places int ) (newVal float64) { | |
var round float64 | |
pow := math.Pow(10, float64(places)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//client id and client secret | |
$client = ''; | |
$secret = ''; | |
//hardcode the full url to redirect to this file | |
$url = ""; | |
//STEP 1 - Get Access Code |
Apache Configuration:
<VirtualHost *:80>
ServerName blah.com
DirectoryIndex index.html index.php
ProxyRequests On
ProxyPreserveHost On
ProxyVia full
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This tool can be used to sync down Red Hat based packages from RHN using only Red Hat shipped tools | |
# Brian "Red Beard" Harrington <brian@dead-city.org> | |
# Copyright 2013 | |
# | |
# To satisfy the pre-reqs for this script install the following two rpms: | |
# yum-utils | |
# createrepo_c (in RHEL 8 createrepo and createrepo_c have been combined) | |
# See https://github.com/rpm-software-management/createrepo_c#differences-in-behavior-between-createrepo_c-and-createrepo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
# Install stuff # | |
################# | |
# Install development tools and some misc. necessary packages | |
yum -y groupinstall "Development tools" | |
yum -y install zlib-devel # gen'l reqs |