Skip to content

Instantly share code, notes, and snippets.

View miho's full-sized avatar

Michael Hoffer miho

View GitHub Profile
import eu.mihosoft.vrl.v3d.Cube as Cube
#print dyio
csg = Cube(20).toCSG()
print "Result = ",csg
@miho
miho / gist:c53634279d6380e2b682
Last active September 7, 2015 14:34 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@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;
@miho
miho / aGameCenter_Codea.h
Created July 22, 2012 20:29 — forked from juaxix/aGameCenter_Codea.h
Objective C - connection with Game Center and highscores board
//
// aGameCenter_Codea.h
//
// Created by Juan Belón on 28/05/12
// Games -> http://www.xixgames.com
// LGPL - @juaxix - Codea connection!
//
#import <Foundation/Foundation.h>
#import <GameKit/GameKit.h>
@miho
miho / ModalConfirmExample.java
Created September 22, 2012 17:57 — forked from jewelsea/ModalConfirmExample.java
JavaFX Modal Confirm Dialog Box Example
import javafx.application.Application;
import javafx.beans.value.*;
import javafx.concurrent.Worker;
import javafx.event.*;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.effect.BoxBlur;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
//
// aGameCenter_Codea.h
//
// Created by Juan Belón on 28/05/12
// Games -> http://www.xixgames.com
// LGPL - @juaxix - Codea connection!
//
#import <Foundation/Foundation.h>
#import <GameKit/GameKit.h>
@miho
miho / Base64.lua
Created December 30, 2012 16:26 — forked from bortels/Base64.lua
-- Lua 5.1+ base64 v3.0 (c) 2009 by Alex Kloss <alexthkloss@web.de>
-- licensed under the terms of the LGPL2
-- character table string
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
-- encoding
function enc(data)
return ((data:gsub('.', function(x)
local r,b='',x:byte()
package org.dejay.prism.opengl;
import com.sun.glass.ui.Screen;
import com.sun.javafx.geom.Rectangle;
import com.sun.javafx.geom.transform.BaseTransform;
import com.sun.javafx.logging.PlatformLogger;
import com.sun.prism.CompositeMode;
import com.sun.prism.RenderTarget;
import com.sun.prism.Texture;
import com.sun.prism.camera.PrismCameraImpl;
//viewDidload
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}