Skip to content

Instantly share code, notes, and snippets.

View shinriyo's full-sized avatar

shinriyo shinriyo

View GitHub Profile
pip install xlwings
@shinriyo
shinriyo / LocalizeSetting.cs
Created August 11, 2016 11:14
Xamarinローカライズのメモメソッド
/// <summary>
/// Creates the localize.
/// </summary>
/// <param name="layout">Layout.</param>
public void CreateLocalize(StackLayout layout)
{
// TODO: ローカライズ.
var selectTitle = "言語選択";
var label = new Label()
@shinriyo
shinriyo / keybinding.json
Last active June 25, 2016 06:56
MonoDevelopに慣れた人のVisual Studio Codeのkeybinding.jsonを晒すぜ
// Place your key bindings in this file to overwrite the defaults
[{
"key": "shift+alt+l",
"command": "editor.action.format"
},{
"key": "shift+cmd+r",
"command": "editor.action.referenceSearch.trigger",
"when": "editorTextFocus"
},{
"key": "cmd+d",
@shinriyo
shinriyo / gist:2bad8d8428bcd03a06218a0f1d5b75e9
Created June 6, 2016 01:46 — forked from j5ik2o/gist:1520836
Scalaで使えそうなWeb系フレームワーク&ライブラリ
@shinriyo
shinriyo / ForcelyBreakPrefab.cs
Created January 29, 2016 10:05 — forked from anonymous/ForcelyBreakPrefab.cs
おかしいプレハブを強制的にブレークする
[MenuItem("GameObject/Forcely Break Prefab", false, 1)]
static void BreakPrefabObject()
{
GameObject disconnectingObj = Selection.activeGameObject;
Selection.activeGameObject = null;
PrefabUtility.DisconnectPrefabInstance(disconnectingObj);
UnityEngine.Object prefab = PrefabUtility.CreateEmptyPrefab("Assets/dummy.prefab");
PrefabUtility.ReplacePrefab(disconnectingObj, prefab, ReplacePrefabOptions.ConnectToPrefab);
PrefabUtility.DisconnectPrefabInstance(disconnectingObj);
AssetDatabase.DeleteAsset("Assets/dummy.prefab");
@shinriyo
shinriyo / ShortCutEditor.cs
Created January 25, 2016 01:29
UIWidgetのdepth値をいじるときのショートカット。 1増やす・・・Control + Shift + k 1減らす・・・Control + Shift + j
namespace EditorUtil
{
/// <summary>
/// 便利メソッド.
/// </summary>
public class CustomMethods
{
/// <summary>
/// Widgetのdepthを1増やす1減らす.
/// ショートカット: Control + Shift + k.
@shinriyo
shinriyo / PlayerPrefsX2.cs
Last active January 9, 2016 07:30
PlayerPrefsXが必須で、オブジェクトを保存できる(完璧ではないが) URL: http://wiki.unity3d.com/index.php/PlayerPrefsX2
/*
PlayerPrefsX2
Author: shinriyo
Date: 1/9/2015
*/
using UnityEngine;
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
@shinriyo
shinriyo / LoadingScript.cs
Created January 25, 2014 18:37
C# Unity ナウローディング
using UnityEngine;
using System.Collections;
public class LoadingScript : MonoBehaviour
{
public string word = "NOW LOADING...";
public float height = 30.0f;
public float speed = 160.0f;
public float deltaX = 25.0f;
public float deltaTime = 30.0f;
@shinriyo
shinriyo / date.js
Created January 9, 2014 13:35
残り時刻を出すのに便利そう UnityScript
function Start () {
//var moment:DateTime = new System.DateTime(1999, 1, 13, 3, 57, 32, 11);
var moment:DateTime = new System.DateTime(2014, 1, 9, 22, 7, 32, 11);
Debug.Log(DateTime.Today);
var delta:TimeSpan = DateTime.Now - moment;
Debug.Log(delta);
Debug.Log(DateTime.Now);
var day:int = delta.TotalDays;
if(day > 0)
@shinriyo
shinriyo / TPRegisterController.m
Created January 3, 2014 08:10
TPRegisterController.mの抜けてたonSubmitメソッド 間違ってるかもしれないが。書いた
- (void)onSubmit
{
[SVProgressHUD showWithStatus:NSLocalizedString(@"TPRegistControllerSending", nil) maskType:SVProgressHUDMaskTypeBlack];
// フォーム取得
QEntryElement *email = (QEntryElement *)[self.root elementWithKey:@"email"];
QEntryElement *password = (QEntryElement *)[self.root elementWithKey:@"password"];
QEntryElement *password_confirm = (QEntryElement *)[self.root elementWithKey:@"password_confirm"];
QEntryElement *username = (QEntryElement *)[self.root elementWithKey:@"username"];
if(email.textValue == NULL || password.textValue == NULL || password_confirm.textValue == NULL || username.textValue == NULL ) {