Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
working

Takuma Maruyama mattak

👨‍💻
working
View GitHub Profile
@mattak
mattak / unity-guid-unused-listup
Created Nov 26, 2019
listup unity resources which is not used
View unity-guid-unused-listup
#!/bin/sh
for f in $(git ls-files | grep '.meta' | grep -v "Assets/Modules/" | egrep '(png|prefab|controller|anim|asset|playable|mp3).meta$')
do
unity_guid=$(cat "$f" | grep 'guid:' | awk '{print $2}')
matches=$(ag -l $unity_guid | wc -l | awk '{print $1}')
if [ $matches -eq 1 ]; then
echo $f | sed 's|.meta$||g'
fi
@mattak
mattak / unity-utf8
Last active Sep 3, 2018
Replace CR line feeding file to linux style line feeding file on unity project
View unity-utf8
#!/bin/sh
for f in $(find Assets -type f -name '*.cs' | grep -v Modules);
do
WIN_LINE_FEED=$(nkf --guess $f | grep "CR")
if [ "$WIN_LINE_FEED" != "" ]; then
echo $f
nkf -Lu --overwrite $f
fi
@mattak
mattak / umm-create.sh
Last active Jul 25, 2018
Create empty umm project
View umm-create.sh
#!/bin/sh
set -ue
if [ ! -e $HOME/.umm-config.json ]; then
cat <<__CHECK__
ERROR: Cannot find umm-config.json
Make sure the file exists on $HOME/.umm-config.json
__CHECK__
exit 0
@mattak
mattak / .gitignore
Created May 1, 2018
My .gitignore of ~/Library/Preferences/Rider2017.3
View .gitignore
port
port.lock
resharper-host/UsageStatistics/
rider.key
disabled_plugins.txt
tasks/
# options
options/recentSolutions.xml
options/recentSolutionsConfiguration.xml
View Keyboard.mm
//==============================================================================
//
// Emoji Filtering: unicode magic
#if FILTER_EMOJIS_IOS_KEYBOARD
static bool StringContainsEmoji(NSString *string)
{
__block BOOL returnValue = NO;
[string enumerateSubstringsInRange:NSMakeRange(0, string.length)
@mattak
mattak / Dockerfile
Created Feb 21, 2017
dockerfile for tileserver-mapnik
View Dockerfile
FROM buildpack-deps:xenial
MAINTAINER Takuma Maruyama <mattak.me@gmail.com>
# Based on work by Petr Sloup
# node setup
# ------------------
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
View package.json
{
"name": "tessera-sample",
"version": "0.0.1",
"description": "tessera example",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "mattak",
"license": "MIT",
View State.cs
using System;
using Unidux;
namespace App.Business
{
[Serializable]
public class State : StateBase<State>
{
public LocationState Location;
public LogState Log;
View GoalSeRenderer.cs
using UniRx;
using UnityEngine;
namespace App.UI
{
public class GoalSeRenderer : MonoBehaviour
{
public AudioSource AudioSource;
void Start()
View Unidux.cs
using System.Diagnostics;
using App.Business;
using Unidux;
using UniRx;
namespace App.UI
{
public partial class Unidux : SingletonMonoBehaviour<Unidux>
{
private Store<State> _store;
You can’t perform that action at this time.