Skip to content

Instantly share code, notes, and snippets.

View asus4's full-sized avatar
:octocat:
Working from home

Koki Ibukuro asus4

:octocat:
Working from home
View GitHub Profile
# Check Xcode version
require_version="0710"
if [[ $XCODE_VERSION_ACTUAL != $require_version ]]; then
echo "error: Required Xcode $require_version (current $XCODE_VERSION_ACTUAL) to build ${PRODUCT_NAME}"
return -1
fi
@asus4
asus4 / psd2png.sh
Created October 28, 2015 09:19
Export *.psd to *.png using ImageMagic.
#!/bin/sh
mkdir out
for f in *.psd
do
echo ${f/psd/png}
# 1.trim
# 2.resize with in (512 x 512)
# 3 convert to png
@asus4
asus4 / setup_mac_signage.sh
Last active November 14, 2017 18:43
Setup mac preferences for Digital signage.
#!/bin/sh
# 自動更新OFF
echo "Disable : SystemPreferences -> AppStore -> Automatically check for updates"
defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false
# 未承認のアプリでも右クリックなく開ける
echo "Disable Warning on opening new App."
spctl --master-disable
@asus4
asus4 / ShellCommand.swift
Last active September 20, 2015 06:56
Execute shell command from swift
//
// ShellCommand.swift
//
// Created by Koki Ibukuro on 9/19/15.
// Copyright © 2015 asus4. All rights reserved.
//
import Foundation
public struct ShellCommand {
@asus4
asus4 / another_cpplint.zsh
Last active April 17, 2017 20:21
cpplint script for XCode openFrameworks.- TARGET -> Build Phases -> New Run Script Phase- Change /bin/bash to /bin/zsh
# or exclude libs/ folder
find src -name "?*.*" ! -regex ".*libs.*" -exec /usr/local/bin/cpplint --filter=-build/header_guard,-runtime/references {} \;
@asus4
asus4 / open_localserver.sh
Last active December 24, 2015 07:53
Open the local server in USB connected android browser, using adb command.
# open localserver
adb shell am start -a android.intent.action.VIEW -d http://`ifconfig | grep ".*inet.*broadcast" | awk 'NR == 1 {print $2}'`:8000/
@asus4
asus4 / Vector3Extension.cs
Created April 6, 2015 05:12
Linq for Unity Vector3.
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
namespace AppKit.Extension
{
public static class Vector3Extension
{
public static Vector3 Average(this IEnumerable<Vector3> source)
{
@asus4
asus4 / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@asus4
asus4 / JsonNode.cs
Last active November 8, 2021 12:41
Simple json accessibility for Unity.
/**
Copyright (c) 2017 Koki Ibukuro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@asus4
asus4 / Editable3DText.cs
Created January 21, 2015 10:43
Enable to edit 3D Text mesh in Unity3D
using UnityEngine;
using System.Collections;
namespace Sample
{
[RequireComponent(typeof(Collider))]
[RequireComponent(typeof(TextMesh))]
public class Editable3DText : MonoBehaviour {
TextMesh label;