start new:
tmux
start new with session name:
tmux new -s myname
| require 'java' | |
| # setup executor | |
| java_import 'java.util.concurrent.ThreadPoolExecutor' | |
| java_import 'java.util.concurrent.TimeUnit' | |
| java_import 'java.util.concurrent.LinkedBlockingQueue' | |
| java_import 'java.util.concurrent.FutureTask' | |
| java_import 'java.util.concurrent.Callable' | |
| core_pool_size = 5 |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'pp' | |
| require 'fog' | |
| require 'highline/import' | |
| def get_password(prompt="Enter password:") | |
| ask(prompt) {|q| q.echo = false} | |
| end |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # This configuration requires Vagrant 1.5 or newer and two plugins: | |
| # | |
| # vagrant plugin install vagrant-hosts ~> 2.1.4 | |
| # vagrant plugin install vagrant-auto_network ~> 1.0.0 | |
| # | |
| # After installation, the following steps will spin up a master and agent that | |
| # can communicate with each other: |
| input { | |
| ## WebLogic Server Log | |
| file { | |
| type => "weblogic" | |
| path => [ "/var/log/weblogic/domain/managedserver.log" ] | |
| codec => multiline { | |
| pattern => "^####" | |
| negate => true | |
| what => previous | |
| } |
| #/bin/bash | |
| ########################################################## | |
| ### INTRODUCTION | |
| ########################################################## | |
| : ' | |
| Install and configure R (Redis) + ELK server from scratch on CentOS 6.5. | |
| * Logstash version 1.4.2 | |
| * Elasticsearch version 1.3.2 |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.