Skip to content

Instantly share code, notes, and snippets.

多段ssh

  1. ローカルで鍵を生成 ssh-keygen -t rsa -b 4096
  2. ~/.ssh/config に設定を書く
  3. ローカルの鍵を踏み台に登録
  • ssh-copy-id fumidai
  • cat ~/.ssh/id_rsa.pub | ssh fumidai 'cat >> ~/.ssh/authorized_keys'と等価
  1. ローカルの鍵を目的に登録
  • ssh-copy-id mokuteki
  • cat ~/.ssh/id_rsa.pub | ssh mokuteki 'cat >> ~/.ssh/authorized_keys'と等価
@hogashi
hogashi / hogas-LTtimer.html
Last active July 6, 2018 14:28
hogas-LTtimer is a simple LT timer works on browser.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>lttimer</title>
<style>
* {
margin: 0;
padding: 0;
font-family: Consolas, monospace;
<html>
<head>
<style>
body {
height: 100vh;
margin: 0;
/* background: #000; */
}
body div {
display: flex;
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta charset="utf-8">
<script>
const env = null // 'dev' or not
if (env === 'dev') {
document.addEventListener('DOMContentLoaded', e => {
setTimeout(() => {
@hogashi
hogashi / github-diff-exclude-binary.js
Created March 21, 2017 15:35
removes diff stat of binary files (shown as "BIN") at "file changes" in GitHub.
Array.from(
document.getElementsByClassName('js-diff-progressive-container')
)
.forEach(container => {
Array.from(
container.getElementsByClassName('Details')
)
.forEach(detail => {
if (detail.getElementsByClassName('diffstat')[0].innerHTML.match(/BIN/)) {
detail.parentNode.removeChild(detail)
@hogashi
hogashi / file1.md
Created June 29, 2017 14:11
複数ファイルのテスト

1こめ

ひとつめ

@hogashi
hogashi / json-formatter.js
Last active July 6, 2018 15:20
jsonを整形するブックマークレット
javascript:(
() => {
const doneId = 'json-formatter-hogashi';
if (document.querySelector(`#${doneId}`)) {
return;
}
/* EDIT HERE: `elem` is the element which has one-lined-JSON text */
const elem = document.querySelector('pre');
let str = elem.innerHTML,
formatted = '',
@hogashi
hogashi / bisum.html
Last active November 3, 2017 18:03
binary number summation TM (Turing Machine) written in JavaScript
<!DOCTYPE html>
<html>
<head>
<title>binary sum TM</title>
<style>
* {
font-family: console, monospace;
}
td.count {
text-align: right;
@hogashi
hogashi / ganttchart.html
Created December 5, 2017 19:37
Gantt chart style example written in HTML/CSS
<!DOCTYPE html>
<html>
<head>
<title>gantt chart</title>
<style>
* {
margin: 0;
padding: 0;
}
main {
@hogashi
hogashi / google-search-tab-fix.js
Last active December 7, 2017 05:01
fix order of tabs at google search page / google検索のタブを好きな順序にするやつ
// EDIT HERE
// tab order
// tab titles (2017/12/07):
// 'すべて', '画像', '動画', '地図', 'ニュース',
// 'ショッピング', '書籍', 'フライト', 'ファイナンス'
const tabOrder = [
'すべて', '画像', '動画', '地図', 'ニュース',
'ショッピング', '書籍', 'フライト', 'ファイナンス'
];
// EDIT HERE