Skip to content

Instantly share code, notes, and snippets.

View yuya's full-sized avatar

Yuya Hashimoto yuya

View GitHub Profile
@yuya
yuya / alias.sh
Created January 3, 2020 14:22
zsh alias
alias l='ls -ltrG'
alias la='ls -laG'
alias ll='ls -lG'
alias ls='ls -G'
@yuya
yuya / index.html
Last active November 25, 2019 13:54
JavaScript でタイマー作る練習 (https://codepen.io/yuya-hashimoto/pen/MWWdPwe)
<!DOCTYPE html>
<html>
<head>
<title>timer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1, user-scalable=no">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<script src="/js/script.js"></script>
</body>
@yuya
yuya / webpage_to_md_link.js
Last active May 2, 2019 07:31
ウェブページのタイトルと URL を Markdown の書式に変更
javascript:(function(){if(/https:\/\/github.+\/milestone\/\d+/.test(location.href)){var c=[],d=/(#\d+)/;[].slice.call(document.querySelectorAll(".opened-by")).forEach(function(a){a=a.innerText.match(d);a.length&&c.push(a[1])});(function(a){var b=document.createElement("textarea");b.textContent=a;document.body.appendChild(b);b.select();document.execCommand("copy");document.body.removeChild(b)})(c.join("\n"));alert("\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3057\u305f")}else alert("Error: \u5404 milestone \u306e\u753b\u9762\u306b\u3066\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044")})();
@yuya
yuya / moveRowsByActiveRow.gs.js
Created April 4, 2018 15:48
[gas][sheetsapi] 選択中の行を指定した行の下に移動
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu("❖ マクロ")
.addItem("[選択行] 指定行の下に行移動", "moveRowsByActiveRow")
.addToUi()
;
}
function moveRowsByActiveRow() {
@yuya
yuya / DownloadCurrentSheet2Xlsx.js
Last active December 13, 2017 02:15
[bookmarklet] 現在のシートのみを .xlsx 形式でダウンロード
javascript:(function(){var a=/^https:\/\/docs\.google\.com\/spreadsheets\/.+\/edit#gid=(\d+)$/;if(a.test(location.href)){var b=location.href.replace(/\/edit.+$/,"/export");a=["exportFormat=xlsx&format=xlsx","gid="+a.exec(location.href)[1]].join("&");window.open(b+"?"+a)}})();
@yuya
yuya / file1.txt
Created August 31, 2016 11:56
Created via API
Demo
@yuya
yuya / gist:324fc71ac45c88f6bd7a43e387daeb7d
Created May 6, 2016 09:59
Safari をシークレットウィンドウで開くワンライナー (JXA)
osascript -l JavaScript -e 'var s = Application("Safari"); var e = Application("System Events"); s.activate(); delay(0.1); e.keystroke("w", {"using": ["command down", "shift down"]}); delay(0.1); e.keystroke("n", {"using": ["command down", "shift down"]});'
using UnityEngine;
using System.Collections;
public class TestInterface : MonoBehaviour {
public string Url;
private string note;
public GUISkin guiSkin;
public GameObject redBoxPrefab;
public GameObject blueBoxPrefab;
@yuya
yuya / AndroidManifest.xml
Last active August 29, 2015 14:08
Android WebView で GeoLocation 許可
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="im.yuya.unitywebview"
android:installLocation="preferExternal"
android:theme="@android:style/Theme.NoTitleBar"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application android:icon="@drawable/app_icon"