Skip to content

Instantly share code, notes, and snippets.

@kirakorn
kirakorn / install-java.sh
Created November 10, 2017 16:22
HomeBrew Revert to Java8 from Java9
#!/usr/bin/env bash
set -e
# Uninstall Java 9 off the bat, so we can fix our local installation
if brew cask ls --versions "java" &>/dev/null; then
echo "Uninstalling Java"
brew cask uninstall java
fi
# Install jenv, java8 and java9
brew install jenv
brew cask install caskroom/versions/java8
@kirakorn
kirakorn / multiple_ssh_setting.md
Last active August 29, 2015 14:26 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
setlocal enabledelayedexpansion
set var=%1
set output=
for /f "delims=" %%a in ('git diff-tree --no-commit-id --name-only -r %1^^') do ( set output=!output! "%%a" )
git archive -o update-%var:~0,7%.zip HEAD %output%
endlocal
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
//parts of this were inspired by https://github.com/prime31/UIToolkit/blob/master/Assets/Plugins/UIToolkit/UIElements/UIText.cs
public class FDFontLabel : FLabel
{
protected int dynamicFontSize = 32;
protected FontStyle dynamicFontStyle = FontStyle.Normal;
// Use this for initialization
void Awake () {
switch(SystemInfo.deviceModel){
case "iPad2,1": //iPad 2 (Wi-Fi Only)
case "iPad2,2": //iPad 2 (Wi-Fi/GSM/GPS)
case "iPad2,3": //iPad 2 (Wi-Fi/CDMA/GPS)
case "iPad2,4": //iPad 2 (Wi-Fi Only, iPad2,4)
case "iPad2,5": //iPad mini (Wi-Fi Only)
case "iPad2,6": //iPad mini (Wi-Fi/AT&T/GPS)
using System;
using UnityEngine;
public class HealthBar : FContainer
{
private const float INSET = 1.0f;
private const float DOUBLE_INSET = INSET*2.0f;
private static Color BAD_COLOR = Color.red;
private static Color OKAY_COLOR = Color.yellow;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Linq;
using System.Text;
using System.Reflection;
/*
@kirakorn
kirakorn / Create iOS Icons.jsx
Created September 18, 2012 05:09 — forked from twonjosh/Create iOS Icons.jsx
Photoshop Script to Create iOS Icons from a source image
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com