Skip to content

Instantly share code, notes, and snippets.

@tml
tml / gist:4428077
Created January 1, 2013 15:13 — forked from tredoe/gist:4419687

Thanks to languages like Go and Rust the developers can now build software for the command line that can run in every architecture and system where those languages can compile. And this is awesome, you code an application which can be compiled in Windows, Mac OS or Linux, getting a full market of users just like with web applications.

Now, the next step is create graphical applications using the same code for those systems. To get this goal is necessary to build libraries of low level that provide access to graphics, audio and input. Later can be built a graphical toolkit. Step by step.

<div class="input-prepend">
<span class="add-on">Day: </span
<select name="day" id="day" class="input-block-level">
<!-- 1 = Sunday ... -->
<!-- somewhere in a common location in your code: $days = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); -->
<?php foreach($days as $d=>$n): ?>
<option value="<?php echo $d;?>" <?php if ($d == $col) echo 'selected="selected"'; ?>><?php echo $n?></option>
<?php endforeach; ?>
</select>
</div>
function subex {
local SCRIPT=$1
local ARG_STRING=$2
local NOT_FOUND_ERROR=$3
local IGNORE_ERRORS=$4
if [ "$NOT_FOUND_ERROR" == "true" -a ! -f $SCRIPT ]; then
echo "$SCRIPT not found!"
exit -1
elif [ ! -f $SCRIPT ]
@tml
tml / FunctionSubstring.cpp
Created June 9, 2013 04:34
This file, src/functions/FunctionSubstring.cpp, is missing from the current Hg repo for xqilla (and has been missing for some time).
/*
* Copyright (c) 2001-2008
* DecisionSoft Limited. All rights reserved.
* Copyright (c) 2004-2008
* Oracle. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n
@tml
tml / Encbox.md
Created July 21, 2013 01:54 — forked from Tho85/Encbox.md

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
(defn queue
[& c]
(into
(clojure.lang.PersistentQueue/EMPTY)
c))
(defn k-combos
[k r]
(if (zero? k) nil
(letfn
@tml
tml / README.md
Created September 7, 2013 15:35 — forked from zacharyvoase/README.md

DataURI.py

Data URI manipulation made easy.

This isn't very robust, and will reject a number of valid data URIs. However, it meets the most useful case: a mimetype, a charset, and the base64 flag.

Parsing

Note 1: The following CQ curl commands assumes a admin:admin username and password.
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
Example: -F"":operation=delete""
Note 3: Quotes around name of package (or name of zip file, or jar) should be included.
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Install a bundle
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
@tml
tml / visitor.js
Last active August 29, 2015 14:13 — forked from tuchida/visitor.js
function parse(str) {
var ir = Packages.jdk.nashorn.internal.ir;
var runtime = Packages.jdk.nashorn.internal.runtime;
var parser = Packages.jdk.nashorn.internal.parser;
var context = runtime.Context.getContext();
var source = new runtime.Source('test', str);
var node = new parser.Parser(context.getEnv(), source, new runtime.Context.ThrowErrorManager(), true).parse();
var lexContext = new ir.LexicalContext();