Skip to content

Instantly share code, notes, and snippets.

View doggan's full-sized avatar

Shyam Guthikonda doggan

View GitHub Profile
@doggan
doggan / GameObjectPool.cs
Created December 17, 2014 05:45
A class for pooling of Unity GameObjects. Allows reuse of GameObjects, while avoiding the expensive overhead of repeated Instantiate/Destroy calls.
using UnityEngine;
using System.Text;
using System.Collections.Generic;
namespace Uzu
{
/// <summary>
/// Class for pooling GameObjects.
/// </summary>
public class GameObjectPool : BaseBehaviour
@doggan
doggan / gist:11feabb4d004332f1aab
Created January 29, 2015 16:18
Dummy JSON data
[{
"_id": "54ca5ceac775a0b0e1bd7aca",
"index": 0,
"guid": "c52239dc-bfb3-4088-83ab-388d137661e7",
"isActive": false,
"balance": "$2,230.27",
"picture": "http://placehold.it/32x32",
"age": 36,
"eyeColor": "blue",
"name": "Francis Baird",
// Linker error.
// (null): "_OBJC_CLASS_$_SUChartboostConfiguration", referenced from:
// (null): Objc-class-ref in ChartboostUnityConfig.o
// (null): Symbol(s) not found for architecture arm64
// (null): Linker command failed with exit code 1 (use -v to see invocation)
-(void)setChartboostAppId:(NSString*) appId{
[SUChartboostConfiguration getConfiguration].appID = appId;
}
-(void)setChartboostAppSignature:(NSString*) appSignature{
@doggan
doggan / sonic_pi_experiment.rb
Created July 31, 2015 04:00
Sonic Pi Experiment
# https://soundcloud.com/doggan/sonic-pi-experiment
live_loop :synth do
use_synth :tb303
256.times do
play 50, amp: 0.75, release: 0.1, cutoff: rrand(60, 120)
sleep 0.125
end
stop
end
#!/bin/sh
#
# Script for splitting a tileset image into multiple image files.
function show_usage() {
local ME=`basename "$0"`
echo "USAGE: $ME <in file> <output dir> --width <value> --height <value> {options}"
echo " "
echo "OPTIONS:"
echo " "
@doggan
doggan / SavWav.cs
Created January 28, 2016 07:46 — forked from darktable/SavWav.cs
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
@doggan
doggan / CloudBuildAPI.cs
Created February 16, 2016 22:47 — forked from joonjoonjoon/CloudBuildAPI.cs
set iOS build version to CloudBuild version
namespace UnityEngine.CloudBuild.API
{
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_CLOUD_BUILD
using UnityEditor;
#!/usr/bin/env python
"""
Script to parse the most frequently used emoji unicode values from http://emojitracker.com.
"""
import argparse
from bs4 import BeautifulSoup
import glob
import os
#!/usr/bin/env python
"""
Pre-processing of emoji images.
Requires ImageMagick (mogrify) to be installed and available via CLI.
"""
import argparse
import os
import subprocess
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
- Parse the raw html dump from http://emojitracker.com, extracting a list of
the most frequently used emoji unicode points.
- Ideally, this script could parse the HTML directly, but since they use
AJAX to render the contents, it's easier to just copy the DOM (in chrome)
to a file and parse the file.
- Scrape/download the emojis from http://apps.timwhitlock.info/emoji/tables/unicode#emoji-modal