Skip to content

Instantly share code, notes, and snippets.

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

JT5D JT5D

💭
Multiversing...
View GitHub Profile
// 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/)
@JT5D
JT5D / instagram.html
Last active September 11, 2015 20:09 — forked from stottsan/instagram.html
Client-side (jQuery/HTML) and server-side (Node.js) code for my Heroku-based Instagram feed reader.
<link rel="stylesheet" href="/css/instagram.css" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<div class="instagram"></div>
<div class="load-more btn">Gimme more photos...</div>
<div class="error">Oops, there was an error getting the photos...</div>
<script src="/js/instagram.js"></script>
@JT5D
JT5D / instagrab.py
Last active August 27, 2015 12:19 — forked from joshkoenig/instagrab.py
"""
Will pull images from a tag.
I'm using this to make a photobook of my brother in law's wedding,
but you might find it helpful for any number of other things.
"""
from instagram.client import InstagramAPI
from pprint import pprint
import urlparse
import urllib
@JT5D
JT5D / yahoo-finance-stock-data.js
Last active August 29, 2015 14:28
Yahoo Finance stock historical data, prices and details retrieval function written in Javascript, jQuery and YQL
/*
Yahoo Finance stock historical data, prices and details retrieval function written in Javascript, jQuery and YQL
v2013-08-05
(c) 2013 by Fincluster ltd - http://fincluster.com <[email protected]>
*/
(function($) {
function getStock(opts, type, complete) {
var defs = {
desc: false,
baseURL: 'http://query.yahooapis.com/v1/public/yql?q=',
@JT5D
JT5D / gist:6b8ea36530563d502bd3
Last active August 29, 2015 14:27 — forked from eklimcz-zz/gist:446b56c0cb9cfe61d575
RSSI to Distance Conversion
function calculateDistance(rssi) {
var txPower = -59 //hard coded power value. Usually ranges between -59 to -65
if (rssi == 0) {
return -1.0;
}
var ratio = rssi*1.0/txPower;
if (ratio < 1.0) {
@JT5D
JT5D / gist:3815ac248f877299e9fa
Last active August 29, 2015 14:27 — forked from eklimcz-zz/gist:50df07bee6b6e67133e5
Beacon Client render
$(document).ready(function() {
var socket = io('http://localhost/client');
var linearScale = d3.scale.linear()
.domain([0, 20])
.range([20, 1000]);
socket.on('connected', function(msg) {
console.log('connected to server');