Skip to content

Instantly share code, notes, and snippets.

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

Focus on High Leverage Activities

Keybase proof

I hereby claim:

  • I am hogmoru on github.
  • I am gumoro (https://keybase.io/gumoro) on keybase.
  • I have a public key ASCIeISx6fsa6Gs8ceBvCh9T1O3ftHRSDOhxbf1Dta90Wwo

To claim this, I am signing this object:

@hogmoru
hogmoru / index.js
Last active June 28, 2017 22:45
requirebin sketch
var ndarray = require("ndarray")
var ops = require("ndarray-ops")
var lena = require("lena")
var pool = require("typedarray-pool")
var warp = require("ndarray-warp")
var zeros = require("zeros")
var luminance = require("luminance")
var totalWidth = lena.shape[1]
var totalHeight = lena.shape[0]
var canvas = document.createElement('canvas');
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import static java.util.concurrent.TimeUnit.SECONDS;
public class MessageProcessor {
import jdk.jshell.tool.JavaShellToolBuilder;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

Technical details for https://stackoverflow.com/a/44169445/6730571

Details of investigation:

On a base system, /usr/bin/java is a symlink that points to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java, which is an Apple wrapper tool that locates and executes the actual java.

(Do not touch anything in those 2 system directories. It should actually be impossible due to "System Integrity Protection" anyway.)

If you don't have Java installed, attempting to execute java will open a dialog that invites you to install it.

@hogmoru
hogmoru / demo_DemoDSLCompilerConfigProvider.java
Last active May 1, 2017 15:06
Demo for Groovy CompilerConfiguration and SecureASTCustomiser
package fr.zami.demo;
import groovy.util.DelegatingScript;
import org.codehaus.groovy.ast.ASTNode;
import org.codehaus.groovy.ast.expr.ArgumentListExpression;
import org.codehaus.groovy.ast.expr.BinaryExpression;
import org.codehaus.groovy.ast.expr.BooleanExpression;
import org.codehaus.groovy.ast.expr.ConstantExpression;
import org.codehaus.groovy.ast.expr.Expression;
import org.codehaus.groovy.ast.expr.MethodCallExpression;
@hogmoru
hogmoru / syncthing_dlpage_experiment_b.html
Last active July 24, 2016 14:04
Experiment B for Syncthing donwload page
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<style>
body {
margin: 40px;
/*
* Experiment for Syncthing's beta download page:
* Highlight download links for local platform, and move them to the top.
*
* Coding convention: variables beginning with $ are jquery selections
*/
var css = document.createElement("style");
css.type = "text/css";
css.innerHTML = "a.dl-suggestion { font-weight: bold; color: #29b74e; }";