Skip to content

Instantly share code, notes, and snippets.

@aumgn
aumgn / JfrMailboxType.scala
Created May 27, 2018 08:04
JfrMailboxType
package whisk.common
import java.lang.management.ManagementFactory
import java.util.concurrent.ConcurrentLinkedQueue
import javax.management.ObjectName
import akka.actor.{ActorRef, ActorSystem}
import akka.dispatch._
import akka.event.LoggerMessageQueueSemantics
import com.oracle.jrockit.jfr._
@aumgn
aumgn / JfrAllocStackCollapse.java
Last active May 18, 2018 08:12
JfrAllocStackCollapse: Takes a JFR (Java Flight Recorder) recording and generate a "stack-collapse'd" text file consumable by a FlameGraph
import com.jrockit.mc.common.IMCFrame;
import com.jrockit.mc.common.IMCMethod;
import com.jrockit.mc.flightrecorder.FlightRecording;
import com.jrockit.mc.flightrecorder.FlightRecordingLoader;
import com.jrockit.mc.flightrecorder.internal.model.FLRStackTrace;
import com.jrockit.mc.flightrecorder.spi.IEvent;
import java.io.*;
import java.util.*;
import java.util.zip.GZIPInputStream;

Keybase proof

I hereby claim:

  • I am aumgn on github.
  • I am aumgn (https://keybase.io/aumgn) on keybase.
  • I have a public key ASDf9NFbTeJXsiWEeR0E-kxO-iumavCQjLCUiY9TNHtE4go

To claim this, I am signing this object:

@aumgn
aumgn / git
Created July 21, 2016 12:26
scat dwarf + clang prototype detection
scat > accuracy git arity
!! Missing data for libz.so.1
!! Missing data for libcrypto.so.1.0.0
!! Missing data for librt.so.1
Information about inference
| Last inference: 2016-07-21 11:08:52
- Total functions infered: 274
Ignored
| Without name: 0
@aumgn
aumgn / grep-arity.log
Last active April 17, 2016 09:01
Add HollowStack - grep-arity.log
scat > display grep arity
('0x7f01f0162f80', ('check_match', 6, 1))
('0x7f01f016a440', ('_dl_name_match_p', 2, 1))
('0x402b30', ('', 2, 1))
('0x402940', ('', 0, 1))
('0x404990', ('', 2, 1))
('0x7f01dc3f2810', ('insert_module', 2, 0))
('0x7f01dc3f2960', ('add_module.isra.0', 4, 0))
('0x4029a0', ('', 4, 1))
('0x404aa0', ('', 1, 0))
@aumgn
aumgn / 0_reuse_code.js
Created April 9, 2014 17:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@aumgn
aumgn / DemoCommandSet.java
Last active December 22, 2015 02:18
Commands addition
public class DemoCommandSet implements CommandSet {
@Command(name="noargs")
public CommandOutcome noargs(CommandSender sender) {
// This command has no argument
return CommandOutcome.SUCCESS;
}
@Command(name="consoleonly")
public CommandOutcome consoleOnly(ConsoleCommandSender sender) {
@aumgn
aumgn / ssh-agent.sh
Last active December 17, 2015 15:39
ssh-agent for Windows Contrary to most scripts available on the web, this one allows to use the same ssh-agent for all shell sessions. It works by specifiying an explicit socket '/tmp/ssh-agent' and using 'ps' to retrieve the pid.
function init_ssh_agent {
echo "Initializing new SSH agent..."
rm -f /tmp/ssh-agent
eval `ssh-agent -a /tmp/ssh-agent`
}
function setup_existing_ssh_agent {
echo "Using existing SSH agent..."
export SSH_AUTH_SOCK=/tmp/ssh-agent
export SSH_AGENT_PID=$(ps -s -u $USERNAME | grep ssh-agent | cut -d' ' -f4)
@aumgn
aumgn / Results
Created November 27, 2012 00:54
Grit/Graal Benchmark
Running each benchmark 1000 times.
Rehearsal ------------------------------------------------
Grit heads 0.000000 0.410000 0.410000 ( 5.257150)
Graal heads 1.150000 0.620000 4.130000 ( 36.643241)
--------------------------------------- total: 4.540000sec
user system total real
Grit heads 0.000000 0.160000 0.160000 ( 4.619689)
Graal heads 1.030000 0.590000 2.560000 ( 30.748539)
@aumgn
aumgn / rbx_group_perm_bug.sh
Created October 31, 2012 13:41
Rubinius group file permission bug
>> id
uid=1000(aumgn) gid=1000(aumgn) groups=1000(aumgn),10(wheel),18(dialout),1001(vboxsf)
>> ll debug.rb
-rw-rw----. 1 aumgn aumgn 10 Oct 31 14:31 debug.rb
>> ruby -v
rubinius 2.0.0dev (1.9.3 release yyyy-mm-dd JI) [i686-pc-linux-gnu]
>> cat debug.rb