Skip to content

Instantly share code, notes, and snippets.

namespace JiTap;
// Note - the flatbuffer exporter has some issues with ordering
// So adjustments for readability need to be tested before commit
//GENERIC - TRANSFORM
table Transform {
posX: double;
posY: double;
@dakom
dakom / Sodium-Loaders.ts
Last active February 27, 2018 16:51
Sodium loaders (wrapping loader-helpers)
//Copied from https://github.com/dakom/sodium-loaders
import {
loadXhrFactory, LoaderXhr, LoaderXhrRequest, LoaderXhrResponse, LOADER_TYPE_XHR,
loadImageFactory, LoaderImage, LoaderImageRequest, LoaderImageResponse, LOADER_TYPE_IMAGE,
loadTextureFactory, LoaderTexture, LoaderTextureRequest, LoaderTextureResponse, LOADER_TYPE_TEXTURE,
LoaderResponseAny,
LoaderRequestAny,
LoaderCallbackAny,
LoaderAny,
class extends React.Component {
private canRender: boolean = false;
private latestData: any;
constructor(props) {
super(props);
let nJobs = 0;
let lastRenderTime: number;
props.someObservableThing.listen(data => {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.22.1/ramda.min.js"></script>
git reset HEAD~3
git add .
git commit -m "README updates"
git push origin master
RESULT:
! [rejected] master -> master (non-fast-forward)
@dakom
dakom / gist:b9c2faaadbf005e4ccc5
Last active August 29, 2015 14:16
Open a bunch of files named in "list.txt" at once (files should be full paths with newline- opened with notepad++)
@echo off
setlocal enableextensions enabledelayedexpansion
set LIST=
for /f %%x in (list.txt) do (
set LIST=!LIST! "%%x"
)
echo %LIST%
"C:\Program Files (x86)\Notepad++\notepad++" %LIST%
@dakom
dakom / Unity Touch Test
Created November 12, 2014 10:13
Test Unity touch info even if not hitting current collider
//http://answers.unity3d.com/questions/425478/onmousedown-not-firing.html
void Update () {
if (Input.GetMouseButtonDown (0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { Debug.Log ("Name = " + hit.collider.name); Debug.Log ("Tag = " + hit.collider.tag); Debug.Log ("Hit Point = " + hit.point); Debug.Log ("Object position = " + hit.collider.gameObject.transform.position); Debug.Log ("--------------"); } }
}
ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4
package
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Shape;
import flash.events.TimerEvent;
import flash.geom.Matrix;
import flash.utils.Timer;
import starling.display.Image;