Skip to content

Instantly share code, notes, and snippets.

View ilkinulas's full-sized avatar

İlkin Balkanay ilkinulas

View GitHub Profile
@ilkinulas
ilkinulas / flickr_search_response.json
Created March 12, 2017 05:58
Flickr search photos json response
{ "photos": { "page": 1, "pages": "3207", "perpage": 100, "total": "320662",
"photo": [
{ "id": "32547078274", "owner": "148578535@N03", "secret": "dcc9f61d9f", "server": "3855", "farm": 4, "title": "", "ispublic": 1, "isfriend": 0, "isfamily": 0 },
{ "id": "33007015650", "owner": "148578535@N03", "secret": "10a9056f37", "server": "660", "farm": 1, "title": "", "ispublic": 1, "isfriend": 0, "isfamily": 0 },
{ "id": "33262233881", "owner": "65702056@N02", "secret": "5a583dd624", "server": "3895", "farm": 4, "title": "Bird", "ispublic": 1, "isfriend": 0, "isfamily": 0 },
{ "id": "32547078094", "owner": "65702056@N02", "secret": "e751d10e40", "server": "3948", "farm": 4, "title": "Bird", "ispublic": 1, "isfriend": 0, "isfamily": 0 },
{ "id": "32575826763", "owner": "146900320@N07", "secret": "259be22cf4", "server": "770", "farm": 1, "title": "", "ispublic": 1, "isfriend": 0, "isfamily": 0 },
{ "id": "32547077724", "owner": "148578535@N03", "secret": "2e1b3ba80c", "server"
@ilkinulas
ilkinulas / DialogBuilder.kt
Created February 26, 2017 13:09
Kotlin Builder Pattern
class Dialog private constructor(
val title: String,
val message: String,
val titleColor: Color,
val bodyColor: Color,
val icon: Image,
val onClose: () -> Unit) {
fun show() {
//...
@ilkinulas
ilkinulas / DateExtensions.kt
Last active February 12, 2017 10:03
Sample for demonstrating extension functions in kotlin
package extensions
import java.text.SimpleDateFormat
import java.util.*
private val calendar: Calendar by lazy {
Calendar.getInstance()
}
fun Date.isSunday(): Boolean {
package peakrobots.ilkin;
import robocode.AdvancedRobot;
import java.awt.event.KeyEvent;
public class TankTrainer extends AdvancedRobot {
enum State {
STEADY, AHEAD, LEFT, RIGHT
@ilkinulas
ilkinulas / CustomHierarchyView.cs
Created July 20, 2016 18:40
editor script that demonstrates how to customize hierarchy window
using UnityEngine;
using UnityEditor;
using System.Text;
[InitializeOnLoad]
public class CustomHierarchyView {
private static StringBuilder sb = new StringBuilder ();
static CustomHierarchyView() {
@ilkinulas
ilkinulas / logcat_verbose.txt
Created May 15, 2016 10:47
Logcat output for unity (verbose)
➜ ~ adb logcat -v time -s Unity
--------- beginning of main
--------- beginning of system
--------- beginning of crash
05-15 13:24:38.217 W/Unity ( 2407): Failed to get permission info for com.google.android.c2dm.permission.RECEIVE, manifest likely missing custom permission declaration
05-15 13:24:38.217 W/Unity ( 2407): Permission com.google.android.c2dm.permission.RECEIVE ignored
05-15 13:24:38.220 W/Unity ( 2407): Failed to get permission info for com.android.vending.BILLING, manifest likely missing custom permission declaration
05-15 13:24:38.220 W/Unity ( 2407): Permission com.android.vending.BILLING ignored
05-15 13:24:38.450 D/Unity ( 2407): GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_packed_depth_stencil GL_OES_ve
@ilkinulas
ilkinulas / logcat_unity.py
Last active November 8, 2022 19:18
Formats unity (adb) logcat logs
#!/usr/bin/python
#
# Usage:
# adb logcat -v time | python logcat_unity.py
import sys
import re
IGNORED_LINES=["(Filename:"]
LOG_TAG="Unity"
using UnityEngine;
using System.Collections;
[RequireComponent(typeof (MeshFilter))]
[RequireComponent(typeof (MeshRenderer))]
public class UVMapping : MonoBehaviour {
void Start () {
float size = 1f;
Vector3[] vertices = {
using UnityEngine;
using System.Collections.Generic;
[RequireComponent(typeof (MeshFilter))]
[RequireComponent(typeof (MeshRenderer))]
public class MeshGenerator : MonoBehaviour {
void Start () {
CreateCube ();
}
@ilkinulas
ilkinulas / CountDownTimer.java
Created April 17, 2016 17:42
CountDownTimer with WeakReferences
package codekata.observer;
import java.lang.ref.WeakReference;
import java.util.LinkedList;
import java.util.List;
public class CountDownTimer {
private static long ONE_SECOND = 1000L;
private long countDownMillis;
private long elapsedTimeSinceLastTick;