Skip to content

Instantly share code, notes, and snippets.

@d-akara
d-akara / key-script.js
Last active September 10, 2017 22:04
After Effects Script
(function() {
var log = new File('~/scripts/output.txt');
log.open("w");
log.encoding = "UTF-8";
function writeProperties(object) {
if (object === null || typeof object === 'undefined') {
log.writeln("Object has no value");
return;
@d-akara
d-akara / keybindings.epf
Created February 20, 2017 23:16
Eclipse keybindings
#Mon Feb 20 18:13:01 EST 2017
\!/=
/instance/org.eclipse.ui.workbench/org.eclipse.ui.commands=<?xml version\="1.0" encoding\="UTF-8"?>\n<org.eclipse.ui.commands>\n<keyBinding commandId\="org.eclipse.ui.navigate.backwardHistory" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="CTRL+-"/>\n<keyBinding commandId\="org.eclipse.ui.navigate.collapseAll" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="COMMAND+SHIFT+["/>\n<keyBinding commandId\="org.eclipse.ui.edit.findPrevious" contextId\="org.eclipse.ui.textEditorScope" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="CTRL+ARROW_LEFT"/>\n<keyBinding commandId\="com.ibm.team.filesystem.ide.ui.command.SyncZoomAction.OUTGOING" contextId\="com.ibm.team.filesystem.ui.changes.views.LocalWorkspaceChangesView.context" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration"
@d-akara
d-akara / keybindings.json
Last active September 30, 2017 00:08
VS Code keybindings
// https://code.visualstudio.com/docs/customization/keybindings
[
{"key": "shift+ctrl+down" , "command": "editor.action.smartSelect.shrink" , "when" : ""},
{"key": "shift+ctrl+up" , "command": "editor.action.smartSelect.grow" , "when" : ""},
{"key": "ctrl+x" , "command": "editor.action.deleteLines" , "when" : "editorTextFocus"},
{"key": "ctrl+alt+." , "command": "bookmarks.jumpToNext" , "when" : "editorTextFocus"},
{"key": "ctrl+alt+," , "command": "bookmarks.jumpToPrevious" , "when" : "editorTextFocus"},
{"key": "alt+b l" , "command": "bookmarks.list" , "when" : "editorTextFocus"},
{"key": "alt+b c" , "command": "bookmarks.clear" , "when" : "editorTextFocus"},
{"key": "alt+b a" , "command": "bookmarks.list
@d-akara
d-akara / JavaAgentTracing.md
Created April 15, 2016 14:27
Tracing for java applications

Java tracing OSGi compatible

Example of tracing agent that can also be used with OSGi

This is a skeleton sample of a tracing agent which will work with or without OSGi. The only dependency is on javassist library. With OSGi, it is necessary to set the correct properties so that the tracing classes can be found in the classpath.

package dakaraphi.tracing;
@d-akara
d-akara / JavaScriptSafeNavigation.md
Last active April 11, 2024 16:18
JavaScript Safe Navigation

Experimental Safe JavaScript Navigation

Implemented using ES6 Proxies and Symbols

The purpose of this function is to provide a way to avoid deep nested conditionals when traversing a hierarchy of objects. Some languages use an operator such as '?.' to perform this capability. This is sometimes called safe navigation or null conditional operators.

You can somewhat think of this as how a xpath select works. If any nodes along the path are not found, your result is simply not found without throwing an exception and without needing to check each individual node to see if it exists.

Suggestions for improvements welcome!

@d-akara
d-akara / debug.legacy.js
Last active January 25, 2016 13:52
Chrome devtools script for debugging. Older browser version
(function () {
"use strict";
var moduleName = "debug";
var symbolOriginal = Symbol('original-implementation');
function interceptFunction(object, methodName, beforeFunction, conditionFunction) {
// Reset original method if it has been overridden
if (object[methodName][symbolOriginal]) {
@d-akara
d-akara / debug.js
Last active April 9, 2021 20:35
Chrome devtools script to assist debugging
(function () {
//"use strict";
const moduleName = "debug";
const symbolOriginal = Symbol('original-implementation');
function interceptFunction(object, methodName, beforeFunction, conditionFunction) {
// Reset original method if it has been overridden
if (object[methodName][symbolOriginal]) {