Skip to content

Instantly share code, notes, and snippets.

View saccadic's full-sized avatar
🌎
Maybe on Earth. Maybe in the future.

Katsuyoshi Hotta saccadic

🌎
Maybe on Earth. Maybe in the future.
  • Osaka
  • 15:49 (UTC +09:00)
View GitHub Profile
@darktable
darktable / MiniJSON.cs
Created November 30, 2011 23:08
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
@4poc
4poc / gist:3155033
Created July 21, 2012 07:56
C++11 variadic template printf with boost::format
#include <boost/format.hpp>
void LogMessage(boost::format& message) {
std::cout << message.str() << std::endl;
}
template<typename TValue, typename... TArgs>
void LogMessage(boost::format& message, TValue arg, TArgs... args) {
message % arg;
LogMessage(message, args...);
@tmathews
tmathews / ellipse-detect.md
Last active April 15, 2018 15:05
Point in Ellipse
@aritzg
aritzg / APKAutoUpdate.java
Created October 22, 2012 19:14
APK auto-update routines
private boolean newVersionAvailable(){
Log.d(TAG, "Check for updates");
RestUtils.initRestTemplate(apkRestClient.getRestTemplate());
Log.d(TAG, "Remote version " + apkRestClient.getVersion());
return false;
}
private void update() {
Log.d(TAG, "Updating apk");
String apkurl = "http://aaa/aaa.apk";
@eendeego
eendeego / bindings-cheat-sheet.md
Created November 28, 2012 10:26
Node/V8 bindings cheat sheet
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Pixmap.Format;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
@m-nori
m-nori / README.md
Created January 11, 2013 03:09
VirtualBoxで共有フォルダを作る方法

VirtualBoxで共有フォルダを作る方法

共有フォルダをそのまま作るとシンボリックリンクが貼れなかったりするので、以下の方法で作成する。


VirtualBoxマネージャで共有フォルダを作成

Windows側で以下の操作を行う。

@BennettSmith
BennettSmith / ..build-protbuf-2.5.0.md
Last active November 26, 2024 06:50
Script used to build Google Protobuf 2.5.0 for use with Xcode 5 / iOS 7. Builds all supported architectures and produces a universal binary static library.

Google Protobuf 2.5.0 - Mac OS X and iOS Support

The script in this gist will help you buid the Google Protobuf library for use with Mac OS X and iOS. Other methods (such as homebrew or direct compilation) have issues that prevent their use. The libraries built by this script are universal and support all iOS device architectures including the simluator.

Get the Script

The easiest way to use this script is to simply clone the gist onto your

@ksasao
ksasao / EdgeJsTest.cs
Last active July 2, 2017 11:11
Edge.js ( https://github.com/tjanczuk/edge ) をつかって C# で Node.js の HTTPサーバをホストするサンプルコード。nuget で Edge.js をインストールしてください。.NET Framework 4.5 または Mono 3.4.0 が必要です。License: WTFPL 実行結果: https://twitter.com/ksasao/status/546691740199960576
using EdgeJs;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace EdgeJsTest
{
class Program
{
public static async void Start()
@ginrou
ginrou / README.md
Created January 4, 2015 01:45
Fast Bilateral Filter

Fast Bilateral Filter implementation for OpenCV

Algorithm and implementation is based on http://people.csail.mit.edu/sparis/bf/ Please cite above paper for research purpose.

Sample Code

#include <iostream>
#include "fastBilateral.hpp"