Skip to content

Instantly share code, notes, and snippets.

@oranie
oranie / gist:8818959
Created February 5, 2014 07:46
check_jolokia_heapused.pl
use strict;
use warnings;
use Getopt::Long qw(:config posix_default no_ignore_case gnu_compat);
use Parallel::ForkManager;
use JMX::Jmx4Perl;
use JMX::Jmx4Perl::Alias;
use JSON ;
use Data::Dumper;
use Log::Minimal;
@oranie
oranie / gist:8970924
Created February 13, 2014 06:49
jmx_to_gf_result_total.pl
#!/bin/perl
use strict;
use warnings;
use Getopt::Long qw(:config posix_default no_ignore_case gnu_compat);
use Parallel::ForkManager;
use JMX::Jmx4Perl;
use JMX::Jmx4Perl::Alias;
use JSON ;
use Data::Dumper;
@oranie
oranie / redis_bench_test.pl
Last active August 29, 2015 13:57
redis_bench_test.pl
#!/usr/bin/perl
use warnings;
use strict;
use lib 'lib';
use Redis::Fast;
use Redis::Fast::Hash;
use Parallel::Benchmark;
use String::Random;
@oranie
oranie / gist:10019066
Created April 7, 2014 12:06
Cassandra JVM OPTS
30137 22217 90.7 31.1 31821672 20555592 ? SLl Mar25 17529:23 /usr/local/java/bin/java -da -javaagent:/usr/local/cassandra//lib/jamm-0.2.5.jar -javaagent:/usr/local/cassandra//lib/jolokia-jvm-1.0.6-agent.jar=port=8778,host=10.172.105.2 -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -XX:+UseCompressedOops -Xms12248M -Xmx12248M -Xmn1600M -XX:+HeapDumpOnOutOfMemoryError -Xss160k -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=32 -XX:TargetSurvivorRatio=80 -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -XX:ParallelGCThreads=16 -XX:+PrintGCDateStamps -Xloggc:/var/log/cassandra/gc.log.20140325-110628 -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.snmp.port=11161 -Dcom.sun.management.snmp.acl=false -Dcom.sun.management.snmp.interface=0.0.0.0 -Dlog4j.configuration=log4j-server.p
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
- 0001-Fix-parser-local-buffers-size-problems.patch
- 0002-Fix-entities-local-buffers-size-problems.patch
- 0003-Fix-an-error-in-previous-commit.patch
- 0004-Fix-potential-out-of-bound-access.patch
- 0005-Detect-excessive-entities-expansion-upon-replacement.patch
- 0006-Do-not-fetch-external-parsed-entities.patch
- 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
- 0008-Improve-handling-of-xmlStopParser.patch
/home/share/oranie/.rbenv/versions/1.9.3-p547/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /home/share/oranie/repo/nata2/lib/nata2/data.rb:17: syntax error, unexpected tLABEL, expecting ')' (SyntaxError)
... def find_bundles(service_name: nil, host_name: nil, databas...
... ^
/home/share/oranie/repo/nata2/lib/nata2/data.rb:17: Can't assign to nil
...find_bundles(service_name: nil, host_name: nil, database_nam...
... ^
/home/share/oranie/repo/nata2/lib/nata2/data.rb:17: Can't assign to nil
...vice_name: nil, host_name: nil, database_name: nil)
... ^
/home/share/oranie/repo/nata2/lib/nata2/data.rb:24: syntax error, unexpected tLABEL, expecting ')'
@oranie
oranie / gist:eb834e54272faac72d85
Last active August 29, 2015 14:05
spinner_sample
package com.example.androidday2togle;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
@oranie
oranie / gist:078791c31ebcdb958aec
Created August 27, 2014 08:18
httpヘッダ 確認
client-nginx間
----------------------------------------
T 127.0.0.1:80 -> 127.0.0.1:40920 [AP]
HTTP/1.1 200 OK.
Server: nginx/1.4.7.
Date: Wed, 27 Aug 2014 08:06:03 GMT.
Content-Type: application/x-javascript.
Content-Length: 28631.
Last-Modified: Thu, 03 Oct 2013 15:44:51 GMT.
Connection: close.
@oranie
oranie / gist:3fe58df3a245320ef47f
Last active August 29, 2015 14:05
python http
T 127.0.0.1:59123 -> 127.0.0.1:5000 [AP]
POST /signout HTTP/1.0.
Host: localhost.
Connection: close.
Content-Length: 68.
User-Agent: ISUCON Agent 2013.
Content-Type: application/x-www-form-urlencoded.
Cookie: isucon_session=9035aa4153263769cdeda48126e78e3058af93d518fdcc662be643cad498724a6f8618e8545639ee.
Accept-Encoding: gzip.
.
@oranie
oranie / MainActivity.java
Created August 28, 2014 05:16
練習クソアプリ
package com.example.androidday2thema;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import android.R.integer;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;