Skip to content

Instantly share code, notes, and snippets.

View alanhg's full-sized avatar
⌨️
Focusing

Alan.He alanhg

⌨️
Focusing
View GitHub Profile
@arnobroekhof
arnobroekhof / pre-commit
Last active May 9, 2022 13:41
Maven pre commit hook
#!/bin/bash
# save the file as <git_directory>/.git/hooks/pre-commit
echo "Running Maven clean test for errors"
# retrieving current working directory
CWD=`pwd`
MAIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# go to main project dir
cd $MAIN_DIR/../../
@JavierParra
JavierParra / radialBattery.sh
Created September 8, 2011 06:38
Displays the battery status of your devices, designed to be used with GeekTool
##################################################################
# YOU NEED IMAGE MAGICK TO RUN THIS #
# DON'T FORGET TO CONFIGURE THE FIRST FEW LINES OF THIS FILE #
##################################################################
# Usage
# 1st - Run this script as a shell geeklet.
#
# You need to pass one of the following parameters:
# ·trackpad
@a1o1
a1o1 / SwingFXWebView.java
Created February 21, 2012 15:24 — forked from anjackson/SwingFXWebView.java
Embedding a JavaFX WebView in a Swing panel.
import com.sun.javafx.application.PlatformImpl;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javafx.application.Platform;
import javafx.collections.ObservableList;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Group;
import javafx.scene.Node;