Skip to content

Instantly share code, notes, and snippets.

View dekobon's full-sized avatar

Elijah Zupancic dekobon

View GitHub Profile
@dekobon
dekobon / bash_conditionals.sh
Created December 12, 2022 17:57
Example of different bash string tests
#!/usr/bin/env bash
# a)
unset FOO
if [ ! -z ${FOO+x} ]; then
echo "a) is true"
fi
# b)
FOO=""
@dekobon
dekobon / health.json
Last active January 31, 2022 23:17
Bank of Sirius Front End Service [Health Check / Info]
{
"components": {
"balance_api": {
"status": "UP",
"components": {
"db": {
"status": "UP",
"details": {
"database": "PostgreSQL",
"validationQuery": "isValid()"
$ 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 August 31, 2018 00:04
Java Manta Environment Setup

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.

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:

@dekobon
dekobon / Getting Started with the JDK on SmartOS.md
Last active September 26, 2018 17:20
Installing Java 8 on SmartOS

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
@dekobon
dekobon / mdb.md
Last active August 29, 2015 14:20 — forked from tjfontaine/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 April 7, 2015 16:13
Returning from callbacks
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);