Skip to content

Instantly share code, notes, and snippets.

View zaki's full-sized avatar

Dezső Zoltán zaki

View GitHub Profile
@zaki
zaki / Gemfile
Created March 13, 2014 08:45
Checking if 艦コレ is finally open... (it's probably not anyway, but whatever)
source "https://rubygems.org"
gem "terminal-notifier"
@zaki
zaki / .zakirc
Created April 14, 2014 02:38
Some aliases
alias st='stree'
alias rpc='rake rpc'
alias remas='rake master:copy && rake master:all'
alias rest='remig test && s'
alias gcozm='g checkout zaki-master'
alias gpzm='g push zaki zaki-master:master'
alias grhom='g reset --hard origin/master'
@zaki
zaki / get_ranks.rb
Created May 29, 2014 11:27
App store rankings for Dashing
#encoding: utf-8
# Disclaimer:
# This is a quick hack to display ios app store rankings. It works for me.
# On your machine for all I know it could delete your hard drive, freeze your city's power grid,
# start WWIII, or even lock Australian people out of their iPhones, so use with caution.
require 'time'
require 'json'
# see genre codes here: https://www.apple.com/itunes/affiliates/resources/documentation/genre-mapping.html
# main country codes (sf=)
@zaki
zaki / keybase.md
Created September 23, 2014 09:46
keybase.md

Keybase proof

I hereby claim:

  • I am zaki on github.
  • I am zaki (https://keybase.io/zaki) on keybase.
  • I have a public key whose fingerprint is 24DF 308C 6D24 C5F2 4EF6 A5F1 C06E C0DE 915F 3569

To claim this, I am signing this object:

@zaki
zaki / Startup.cs
Created October 7, 2014 06:50
Unity helper - Jump to title scene on start
using UnityEngine;
public class Startup : MonoBehaviour
{
private GameObject game = null;
[SerializeField]
private string startScene = "Title";
public void Awake()
{
@zaki
zaki / merge_repos.sh
Created October 31, 2014 10:51
Merge two repositories
mkdir repo_merge
cd repo_merge
git clone zaki/test_server
git clone zaki/test_client
## PREPROCESS SERVER
cd test_server
git remote rm origin # precaution
@zaki
zaki / UnityInternalCompilerError.cs
Created November 25, 2014 03:32
Internal compiler error inducing typo in unity 5
// Compile error in unity 5
using UnityEngine;
public class Test
{
public enum TEST : byte
{
NONE = 0,
TEST = 1,
@zaki
zaki / pure_virtual.cpp
Last active August 29, 2015 14:10
virtual diamonds are a programmers best enemy
class Class1
{
public:
Class1() { dummy2(); }
virtual void dummy() = 0;
void dummy2() { dummy(); }
};
class Class2 : public Class1
{
@zaki
zaki / Singleton.cs
Created December 3, 2014 02:40
Singleton
namespace Friday
{
public class Singleton<T> where T : class, new()
{
protected static T instance = null;
public static T Instance
{
get
{
@zaki
zaki / check_references.rb
Last active August 29, 2015 14:13
Find missing script references in unity prefabs
#!/bin/env ruby
guids = {}
dir = File.dirname(__FILE__) + "/../../unity/Assets/**/*.meta"
Dir.glob(dir, File::FNM_DOTMATCH).each do |script|
if File.read(script) =~ /guid: ([\h]+$)/m
guids[$1] = $1
end
end