Skip to content

Instantly share code, notes, and snippets.

Avatar

Elijah Zupancic dekobon

View GitHub Profile
View directory-metadata-example.txt
$ mmkdir ~~/stor/mydir
$ minfo ~~/stor/mydir
HTTP/1.1 200 OK
last-modified: Wed, 03 Apr 2019 17:07:31 GMT
content-type: application/x-json-stream; type=directory
result-set-size: 0
date: Wed, 03 Apr 2019 17:07:38 GMT
server: Manta
x-request-id: fc18029e-0866-42e2-a96a-6fff204e8abe
@dekobon
dekobon / setup.md
Created Aug 31, 2018
Java Manta Environment Setup
View setup.md

Java Manta Environment Setup

  1. Install JVM (for now, let's use Java 8). For a certified OpenJDK build, I like to install Azul's Zulu. However, be sure to install the JVM Cryptographic extensions in order to support client side encryption. For Zulu, see: Zulu Cryptography Extension Kit.

  2. Install Maven into your path. If you are using Ubuntu, apt-get install maven is all that you need to do.

  3. Install IntelliJ. You can use the free community edition because the SDK doesn't need the features in the fancy version.

  4. After IntelliJ is installed, go to plugins and install the Error-prone Compiler Integration.

View keybase.md

Keybase proof

I hereby claim:

  • I am dekobon on github.
  • I am elijah_joy (https://keybase.io/elijah_joy) on keybase.
  • I have a public key whose fingerprint is 95AB 39C8 5E92 616D 5025 EC7A DF18 85A3 80B6 93B0

To claim this, I am signing this object:

View Getting Started with the JDK on SmartOS.md

Installing the Oracle Java 8 JDK on SmartOS

  1. Go to: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  2. Download the "Solaris x64 XX.X MB jdk-8u66-solaris-x64.tar.gz" tarball from the Oracle Java SE site. You won't be able to paste the URL into curl on your SmartOS instance unless you click it first to get the authentication parameter. Regardless, get the tarball any way that you prefer and copy it onto your SmartOS instance.
  3. Extract the tarball and copy it to the location of your choosing.
  4. Globally set the value of the environment variable JAVA_HOME to the path of the JVM.
  5. Update your PATH to include the Java bin directory by setting it to PATH=$PATH:$JAVA_HOME/bin
View mdb.md

MDB is unlike most debuggers you've experienced.

It is not a source level debugger like gdb or lldb or even Node's builtin debugger

Generally used for postmortem analysis.

Postmortem is for Production and Development

We operate mostly on core files, though you can attach to running processes as well.

@dekobon
dekobon / callback_style.js
Created Apr 7, 2015
Returning from callbacks
View callback_style.js
var fs = require('fs');
String.prototype.endsWith = function (suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;
};
exports.ls1 = function ls1(dir, ext, callback) {
try {
fs.readdir(dir, function (err, files) {
if (err) return callback(err, null);