Skip to content

Instantly share code, notes, and snippets.

View HanSolo's full-sized avatar

Gerrit Grunwald HanSolo

View GitHub Profile
@pklaus
pklaus / netio230a.cpp
Created January 8, 2010 11:14
Simple Koukaam NETIO-230A automation via Raw TCP using C++, Java, PHP, Ruby, expect, Bash-TCP and wget (HTTP)
// example for a raw TCP socket connection using C++ to interface the Koukaam NETIO-230A
// resources:
// <http://www.ecst.csuchico.edu/~beej/guide/ipc/usock.html>
// <http://cs.nmu.edu/~randy/Classes/CS228/Notes/making-a-client-socket.html>
#include <iostream>
#include <string>
#include <unistd.h> // gethostbyname()
#include <sys/socket.h> // socket(), connect()
@jewelsea
jewelsea / BoundsPlayground.java
Created December 7, 2011 08:14
Demo for understanding JavaFX Layout Bounds
import javafx.application.Application;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.ReadOnlyObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
@jewelsea
jewelsea / CodeEditor.java
Created December 11, 2011 23:30
CodeMirror based code editor for JavaFX
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebView;
/**
* A syntax highlighting code editor for JavaFX created by wrapping a
* CodeMirror code editor in a WebView.
*
* See http://codemirror.net for more information on using the codemirror editor.
*/
public class CodeEditor extends StackPane {
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
import javafx.animation.AnimationTimer
RND = new Random()
DATA_PERIOD = 2500000000l
lastDataCall = 0
TIMER = [
handle: {long l ->
long currentNanoTime = System.nanoTime()
if (currentNanoTime > lastDataCall + DATA_PERIOD) {
import javafx.animation.AnimationTimer
RND = new Random()
DATA_PERIOD = 2500000000l
lastDataCall = 0
TIMER = [
handle: {long l ->
long currentNanoTime = System.nanoTime()
if (currentNanoTime > lastDataCall + DATA_PERIOD) {
@timyates
timyates / C compile Linux
Created June 29, 2012 10:07
JNA and Groovy
gcc -o libgreet.so -shared greet.c
@miho
miho / CodeEditor.java
Created July 21, 2012 13:19 — forked from jewelsea/CodeEditor.java
CodeMirror based code editor for JavaFX
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebView;
/**
* A syntax highlighting code editor for JavaFX created by wrapping a
* CodeMirror code editor in a WebView.
*
* See http://codemirror.net for more information on using the codemirror editor.
*/
public class CodeEditor extends StackPane {
@miho
miho / CenteredNodeInScrollPaneExample.java
Created July 21, 2012 13:40 — forked from jewelsea/CenteredNodeInScrollPaneExample.java
Example of scrollpane viewports, transforms and layout bounds in JavaFX
import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Bounds;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Scene;
@kevinsdooapp
kevinsdooapp / LogarithmicAxis.java
Created July 31, 2012 16:26
LogarithmicAxis class that extends ValueAxis
import javafx.scene.chart.ValueAxis;
/**
* A logarithmic axis implementation for JavaFX 2 charts<br>
* <br>
*
* @author Kevin Senechal
*
*/
public class LogarithmicAxis extends ValueAxis<Number> {