Skip to content

Instantly share code, notes, and snippets.

shinriyo shinriyo

Block or report user

Report or block shinriyo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shinriyo
shinriyo / paintSVG.ts
Created Sep 28, 2018
SVGで色を無理やり付ける(IE, Edge) TypeScript
View paintSVG.ts
/**
* SVGで色を無理やり付ける(IE, Edge).
*
* @param {*} name
* @param {*} elem
* @param {*} fillColor
* @returns {void}
*/
export const paintSVG = (name: string, elem: any, fillColor: any): void => {
let a = '99';
@shinriyo
shinriyo / univ.sh
Created Jul 31, 2018
東京医科歯科大学と東京医科大学と東京歯科大学全てにマッチするbash正規表現
View univ.sh
#!/bin/bash
univ="東京医科歯科大学"
if [[ ${univ} =~ ^東京(医科)?(歯科)?大学$ ]]; then
all=${BASH_REMATCH[0]}
echo part1. ${all}
fi
univ="東京医科大学"
@shinriyo
shinriyo / hoge.html
Last active Jul 27, 2018
いろんなフォント
View hoge.html
<html>
<head>
<meta charset="utf-8">
<style>
body,div,table,thead,tbody,tfoot,tr,th,td,p { font-size:small; padding:0 }
body,div,table,thead,tbody,tfoot,tr,th,td,p {
line-height: 1;
/*font-family: 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', Meiryo, メイリオ, Osaka, 'MS PGothic', arial, helvetica, sans-serif;*/
}
@shinriyo
shinriyo / app.js
Created Sep 4, 2016
これをコピペで使う
View app.js
import React from 'react'
import { render } from 'react-dom'
import { hashHistory, Router, Route, Link, browserHistory } from 'react-router'
var IndexRoute = Router.IndexRoute;
var Index = React.createClass({
render: function () {
return (
<div>
@shinriyo
shinriyo / LocalizeSetting.cs
Created Aug 11, 2016
Xamarinローカライズのメモメソッド
View LocalizeSetting.cs
/// <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 Jun 25, 2016
MonoDevelopに慣れた人のVisual Studio Codeのkeybinding.jsonを晒すぜ
View 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 Jun 6, 2016 — forked from j5ik2o/gist:1520836
Scalaで使えそうなWeb系フレームワーク&ライブラリ
View gist:2bad8d8428bcd03a06218a0f1d5b75e9
@shinriyo
shinriyo / ForcelyBreakPrefab.cs
Created Jan 29, 2016 — forked from anonymous/ForcelyBreakPrefab.cs
おかしいプレハブを強制的にブレークする
View 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 Jan 25, 2016
UIWidgetのdepth値をいじるときのショートカット。 1増やす・・・Control + Shift + k 1減らす・・・Control + Shift + j
View ShortCutEditor.cs
namespace EditorUtil
{
/// <summary>
/// 便利メソッド.
/// </summary>
public class CustomMethods
{
/// <summary>
/// Widgetのdepthを1増やす1減らす.
/// ショートカット: Control + Shift + k.
@shinriyo
shinriyo / PlayerPrefsX2.cs
Last active Jan 9, 2016
PlayerPrefsXが必須で、オブジェクトを保存できる(完璧ではないが) URL: http://wiki.unity3d.com/index.php/PlayerPrefsX2
View PlayerPrefsX2.cs
/*
PlayerPrefsX2
Author: shinriyo
Date: 1/9/2015
*/
using UnityEngine;
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
You can’t perform that action at this time.