Skip to content

Instantly share code, notes, and snippets.

@einnocent
einnocent / whatever.xml
Created May 6, 2014 04:51
WE8S ICE config file (minus passwords)
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:ew="urn:schemas-microsoft-
com:embedded.unattend.internal.v2">
<settings pass="offlineServicing">
<component name="Microsoft-Windows-Audio-AudioCore" processorArchitecture="amd64"
ppublicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
@einnocent
einnocent / SJJShellConfig.xml
Created May 6, 2014 04:47
SJJ Shell config file (minus license key)
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample XML custom shell config file -->
<Items>
<Config>
<License>REDACTED</License>
<NumRows>4</NumRows>
<NumCols>7</NumCols>
<BackColor>Blue</BackColor>
<ShellLauncher>C:\zoobac\lib\launch-scoreboard-windows.bat</ShellLauncher>
<ShellStartIn>C:\zoobac\lib</ShellStartIn>
@einnocent
einnocent / dotdictify.py
Last active July 24, 2017 20:05
Modified Python Dotdictify
# turn dict into an object that allows access to nested keys via dot notation
# from http://stackoverflow.com/questions/3797957/python-easily-access-deeply-nested-dict-get-and-set
# made three modifications:
# --added `get()` method
# --added `if not dict.__contains__...` to `__contains__()`
# --can now accept None as key
class dotdictify(dict):
def __init__(self, value=None):
if value is None:
pass
@einnocent
einnocent / CustomCursor.java
Created September 4, 2013 00:36
Simple class for giving Apache Pivot components a blank cursor
import java.awt.Cursor;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import org.apache.pivot.wtk.Component;
// based on http://stackoverflow.com/a/1984117/538222
public class CustomCursor
{
#!/bin/bash
cd ~/MyApp-0.0.2-SNAPSHOT/lib
java -cp commons-lang3-3.1.jar:kitfox-svg-core-1.0.0-build001.jar:pivot-core-2.0.2.jar:pivot-wtk-2.0.2.jar:pivot-wtk-terra-2.0.2.jar:slf4j-api-1.7.5.jar:slf4j-simple-1.7.5.jar:MyApp-0.0.2-SNAPSHOT.jar com.einnocenttech.myapp.MyApp
@einnocent
einnocent / StackPaneLabelScaleExample.bxml
Created July 24, 2013 23:33
StackPaneLabelScaleExample -- Example of possible bug with use of StackPane and ScaleDecorator in Apache Pivot 2.0.2
<Window title="Labels" maximized="true" xmlns:bxml="http://pivot.apache.org/bxml"
xmlns="org.apache.pivot.wtk">
<StackPane bxml:id="mainContainer" styles="{backgroundColor:'#cccccc'}">
<!-- sample SVG available at http://upload.wikimedia.org/wikipedia/commons/5/59/Usa_counties_large.svg -->
<ImageView bxml:id="background" image="/Usa_counties_large.svg"
styles="{horizontalAlignment:'left', verticalAlignment:'top', fill:true, preserveAspectRatio:true}" />
<Label bxml:id="countyLabel" text="King County" x="0" y="0"
styles="{font:'Helvetica bold 24', color:'#ff0000', wrapText:true}" />
</StackPane>
</Window>
@einnocent
einnocent / FullScreenKeyDetectionErrorExample.java
Last active December 20, 2015 00:39
Example of possible Apache Pivot UnprocessedKeyHandler bug in fullscreen mode. Uncomment line 27 to switch between windowed and fullscreen modes. (JRE 1.7.0_21; Mac OS X 10.6.8; Apache Pivot 2.0.2)
import java.awt.Color;
import java.awt.Font;
import org.apache.pivot.collections.Map;
import org.apache.pivot.wtk.Application;
import org.apache.pivot.wtk.Application.UnprocessedKeyHandler;
import org.apache.pivot.wtk.DesktopApplicationContext;
import org.apache.pivot.wtk.Display;
import org.apache.pivot.wtk.HorizontalAlignment;
import org.apache.pivot.wtk.Keyboard.KeyLocation;