Skip to content

Instantly share code, notes, and snippets.

@oshuya
oshuya / copt2clipboard.html
Created January 30, 2019 12:24
Get element and copy to clipboard
<body>
<button onclick="copyText()">Copy text</button>
<div id="hoge">hoge</div>
<script>
function copyText(){
var ta = document.createElement("textarea")
ta.value = document.getElementById("hoge").innerText;
document.body.appendChild(ta)
ta.select()
000010******************************************************************
000020*
000030** システム名:COBOL紹介プログラム
000040*
000050** 機能概要 :入力された数値が50以上であれば50を引いた数値を
000060* そうでなければそのまま数値を標準出力する
000070** 作成者 :shuya
000080** 作成日 :2018 12/06
000090** 変更履歴:初版作成
000100*
@oshuya
oshuya / todofuken.json
Created June 2, 2018 07:26
都道府県のJSON(反転版)
[
{
"北海道":"hokkaido"
},
{
"青森県":"aomori"
},
{
"岩手県":"iwate"
},
@oshuya
oshuya / todofuken.json
Created June 2, 2018 07:24
都道府県のJSON
[
{
"hokkaido": "北海道"
},
{
"aomori": "青森県"
},
{
"iwate": "岩手県"
},
#!/bin/bash
# UNINSTALLS Open-EID SOFTWARE
function remove_all {
for user in $(dscl . list /Users |grep -v -e '^_.*' -e Guest -e root -e daemon -e nobody); do
sudo -u "${user}" /Library/PreferencePanes/id-updater.prefPane/Contents/Resources/id-updater-helper -remove
done
sudo rm -rf /Library/PreferencePanes/id-updater.prefPane
@oshuya
oshuya / tau_reservation.js
Created September 20, 2017 14:30
tauの予約を便利にするやつ
/* 改行を削除して使ってね */
javascript:
/*会議名*/
document.getElementsByName("txtShowString")[0].value = "Kumo";
/*団体名*/
document.getElementsByName("txtLoginID")[0].value = "村井純研究室";
/*教員名*/
document.getElementsByName("txtTeacherName")[0].value = "";
/*人数*/
document.getElementsByName("txtNumberOfPeople")[0].value = "20";
@oshuya
oshuya / NOC-memo.md
Created August 25, 2017 01:36
NOCのメモ

WLCのリセット

(Cisco Contorller) > clear config
Are you shure want to clear the configuration? (y/n) y

(Cisco Controller) > reset system
The system has unsaved changes.
Would you like to save them now? (y/N)N

Configuration Not Saved!
@oshuya
oshuya / samoleTensor.py
Created August 1, 2017 08:51
tensorflowのサンプル
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist= input_data.read_data_sets('MNIST_data',one_hot=True)
X = tf.placeholder(tf.float32, shape=[None, 784])
Y = tf.placeholder(tf.float32, shape=[None, 10])
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))

Keybase proof

I hereby claim:

  • I am oshuya on github.
  • I am shuya (https://keybase.io/shuya) on keybase.
  • I have a public key ASAhZHAW7wmtyZV3wYJAi8pfO6WXCgIh5Jdgc7SHCwsNzgo

To claim this, I am signing this object: