Skip to content

Instantly share code, notes, and snippets.

View JT5D's full-sized avatar
💭
Multiversing...

JT5D JT5D

💭
Multiversing...
View GitHub Profile
@JT5D
JT5D / min-char-rnn.py
Created April 22, 2016 04:41 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@JT5D
JT5D / kmz2json-index.js
Created April 9, 2016 04:24 — forked from bmount/kmz2json-index.js
Node.js kmz-to-json stream via ogr2ogr. from substack/shp2json
var spawn = require('child_process').spawn;
var fs = require('fs');
var path = require('path');
var seq = require('seq');
var findit = require('findit');
var BufferedStream = require('morestreams').BufferedStream;
module.exports = function (inStream) {
var id = Math.floor(Math.random() * (1<<30)).toString(16);
var tmpDir = path.join('/tmp', id);
@JT5D
JT5D / TouchCamera.cs
Created April 6, 2016 06:31 — forked from hiko9lock/TouchCamera.cs
[Unity 3D] Testing camera pan,zoom, orbit for iOS. Setting camera target after you have attached this camera script to camera object.
using UnityEngine;
using System.Collections;
public class TouchCamera : MonoBehaviour {
public Transform target;
Vector3 f0Dir= Vector3.zero;
float zoomDistance= 5;
float theta= 0.0F;
float fai= 0.0F;
float dx= 0.0F;
@JT5D
JT5D / README.md
Created March 28, 2016 09:13 — forked from bsergean/README.md
Anti-aliasing (FXAA) with headless-gl and three.js

Aliased

Anti-aliased

Getting the code

@JT5D
JT5D / npm-upgrade-bleeding.sh
Created March 15, 2016 06:22 — forked from othiym23/npm-upgrade-bleeding.sh
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
// iMacro CheatSheet - Command Reference
// http://wiki.imacros.net/Command_Reference
// iMacros supports 3 types of variables:
// * The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro.
// * Built-in variables. They contain certain values set by iMacros.
// * User-defined variables. They are defined in-macro using the SET command.
@JT5D
JT5D / gist:48fc7d5982c0d5c276f6
Created December 16, 2015 08:10 — forked from jeremyfelt/gist:5565120
Steps to install Webcam Pulse Detector in OS X 10.8.3
# Starting with...
# OS X 10.8.3
# python 2.7.2 // python --version
# c++ 4.0 // c++ --version
# g++ 4.2 // g++ --version
#
# Update/Install XCode command line utils
# c++ 4.2 // c++ --version
#
# Doing all my work in ~/Development
@JT5D
JT5D / ffmpeg-tips.md
Created December 14, 2015 08:25 — forked from revolunet/ffmpeg-tips.md
ffmpeg tips

convert to another format, resize withouth quality loss

ffmpeg -i vitrine.mp4 -vf scale=1024:-1 -q:vscale 0 vitrine.avi

concat video files

ffmpeg -f concat -i repeat.txt -c copy vitrine2.mp4

in repeat.txt:

file 'file1.avi'
file 'file2.avi'
@JT5D
JT5D / VertexBlendMasked
Created November 17, 2015 10:50 — forked from Petethegoat/VertexBlendMasked
Shader for Unity that vertex blends two textures with a mask. Imperfect.
Shader "Custom/VertexBlendMaskedCleanEdges" {
Properties
{
_Over ("Over", 2D) = "white" {}
_Under ("Under", 2D) = "white" {}
_Mask ("Mask", 2D) = "white" {}
_Bias ("Edge Bias", Range(0.5, 30.0)) = 4.0
_Edge ("Edge Sharpness", Float) = 10.0
_Fall ("Blend Falloff", Float) = 1.0
}
@JT5D
JT5D / UnitySynchronizeInvoke.cs
Created November 8, 2015 03:25 — forked from JakubNei/DeferredSynchronizeInvoke.cs
Implementation of ISynchronizeInvoke for Unity3D game engine. Can be used to invoke anything on main Unity thread. ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well. I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject.
/*
Implementation of ISynchronizeInvoke for Unity3D game engine.
Can be used to invoke anything on main Unity thread.
ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well.
I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject.
help from: http://www.codeproject.com/Articles/12082/A-DelegateQueue-Class
example usage: https://gist.github.com/aeroson/90bf21be3fdc4829e631
license: WTFPL (http://www.wtfpl.net/)