Skip to content

Instantly share code, notes, and snippets.

@davidB
davidB / ReCaptcha.scala
Created October 8, 2010 07:56
code I used to integrate recaptcha with Lift ProtoUser (2.1)
package net_alchim31_vscaladoc2_www.model
/**
* To use ReCaptach (http://www.google.com/recaptcha) :
* * add a project dependency
* <dependency>
* <groupId>net.tanesha.recaptcha4j</groupId>
* <artifactId>recaptcha4j</artifactId>
* <version>0.0.7</version>
@davidB
davidB / FakeThreadState.java
Created July 21, 2011 09:49
I used the following code to check if Thread of java process can have independent state
// I used the following code to check if Thread of java process can have independent state with
// ps -Teo state,pcpu,pmem,nlwp,pid,spid,user,args |grep FakeThread
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
// The goal is to create several Thread that should be in different state and check if ps or other catch the correct state of the thread
public class FakeThreadState {
#!/usr/bin/env python
#require PyGithub (pip install PyGithub)
#see https://github.com/jacquev6/PyGithub
import sys
import urllib2
import os
import os.path
from pipes import quote
@davidB
davidB / HelloWorld.java
Last active October 13, 2015 10:47
test uri of gist for run_on_jvm
public class HelloWorld {
public static void main(String args[]) {
String arg0 = args.length > 0 ? args[0] : "";
System.out.println("Hello World ! " + arg0);
}
}
@davidB
davidB / AsyncSimpleLinkedList.dart
Last active December 14, 2015 04:38
SimpleLinkedList for dart, success on single-thread but Failed when used with Future, requestAnimationFrame, httpRequest.onLoadEnd,...
import 'dart:async';
class SimpleLinkedEntry {
SimpleLinkedEntry _next = null;
var _obj;
}
class AsyncSimpleLinkedList<E> {
Future<SimpleLinkedEntry> _head = new Future.immediate(null);
class Game {
var _world;
var _renderSystem;
var _gameLoop;
Game(){
// create instance
var container = query("#game");
_world = new World();
import 'package:propcheck/propcheck.dart';
import 'package:enumerators/combinators.dart' as c;
import 'package:enumerators/enumerators.dart' as e;
import 'package:unittest/unittest.dart';
//import 'package:unittest/compact_vm_config.dart';
import 'package:unittest/vm_config.dart';
class Name {
String first;
String last;

Overview

The following instruction are based on the WineHQ >... > Unity + my own experience.

What works

  • Installation,
  • scene editor and gui,
  • opening existing projects,
  • Linux export,
/// License [CC0](http://creativecommons.org/publicdomain/zero/1.0/)
package tonegod.ext;
import com.jme3.math.Vector2f;
import com.jme3.renderer.RenderManager;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.Node;
import com.jme3.scene.Spatial;
import com.jme3.scene.control.AbstractControl;
import java.util.Collection;
/// License [CC0](http://creativecommons.org/publicdomain/zero/1.0/)
package tonegod.ext;
import com.jme3.export.JmeExporter;
import com.jme3.export.JmeImporter;
import com.jme3.export.Savable;
import com.jme3.math.Vector2f;
import com.jme3.math.Vector4f;
import com.jme3.scene.Node;
import java.io.IOException;