This file contains hidden or 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
| #!/usr/bin/env groovy -cp restlet-1.1.10/httpclient/* | |
| /*** SETTINGS ***/ | |
| requestsToSend = args.length >= 1 ? args[0] as Integer : 10000 | |
| concurrency = args.length >= 2 ? args[1] as Integer : 10 | |
| port = args.length >= 3 ? args[2] as Integer : 3000 |
This file contains hidden or 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
| # First do a fresh install of CentOS 5.7 i386, server configuration (no GUI) | |
| # This should be performed as root since it's going to be installing a bunch of stuff | |
| # --- Update things to make sure we have the latest patches --- | |
| # Add EPEL so we can get reasonably recent packages | |
| rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
| # --- Install all the packages --- # | |
| yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached |
This file contains hidden or 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
| import java.util.Collection; | |
| import java.util.List; | |
| import java.util.ListIterator; | |
| import org.springframework.data.domain.PageImpl; | |
| import org.springframework.data.domain.Pageable; | |
| /** | |
| * Extension class between spring data commons and java.util.List that is | |
| * required to get MyBatis to use it as a return value. |
This file contains hidden or 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/sh | |
| ### BEGIN INIT INFO | |
| # Provides: carbon-cache | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: carbon-cache init script | |
| # Description: An init script for Graphite's carbon-cache daemon. | |
| ### END INIT INFO |
This file contains hidden or 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
| #!/etc/init/carbon-cache.conf | |
| description "Carbon server" | |
| start on filesystem or runlevel [2345] | |
| stop on runlevel [!2345] | |
| umask 022 | |
| expect fork | |
| respawn |
This file contains hidden or 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 net.hausherr.sample; | |
| import org.apache.http.client.CookieStore; | |
| import org.apache.http.conn.routing.HttpRoute; | |
| import org.apache.http.conn.routing.HttpRoutePlanner; | |
| import org.apache.http.conn.scheme.PlainSocketFactory; | |
| import org.apache.http.conn.scheme.Scheme; | |
| import org.apache.http.conn.scheme.SchemeRegistry; | |
| import org.apache.http.conn.ssl.SSLSocketFactory; | |
| import org.apache.http.conn.ssl.TrustStrategy; |
This file contains hidden or 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
| #!/usr/local/bin/php | |
| <?php | |
| /** | |
| * Pre-commit Subversion script. | |
| * | |
| * Forces the commit message to have a line like | |
| * review: 42 | |
| * and checks that the review has received a Ship It! from | |
| * a peer. | |
| * @author Omni Adams <[email protected]> |
This file contains hidden or 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
| public static void downloadFile(final Long fileId) throws IOException { | |
| response.setHeader("Accept-Ranges", "bytes"); | |
| notFoundIfNull(fileId); | |
| File underlyingFile = ... //load file | |
| String fileName = ...//name of the file | |
| Header rangeHeader = request.headers.get("range"); | |
| if (rangeHeader != null) { | |
| throw new PartialContent(underlyingFile, fileName); |
This file contains hidden or 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
| public class HelloWorld { | |
| public static void main(String[] args) throws Exception { | |
| System.out.println("Hello World!"); | |
| System.in.read(); | |
| } | |
| } |
This file contains hidden or 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
| List of threads: | |
| 4210 Thread-4 | |
| 4208 WatcherThread | |
| 4209 Timer-0 | |
| 4207 Low Memory Detector | |
| 4206 C2 CompilerThread1 | |
| 4205 C2 CompilerThread0 | |
| 4204 Signal Dispatcher | |
| 4203 Finalizer |
OlderNewer