Skip to content

Instantly share code, notes, and snippets.

View HayatoDoi's full-sized avatar
💭
🤔

Hayato Doi HayatoDoi

💭
🤔
View GitHub Profile
" =====================================================
" This program is for the Japanese.
" Therefore, comments are written in Japanese.
" All will be understood by reading the source code.
" =====================================================
" File name : AutoHotkey.ahk
" Author : Hayato Doi
" Last Update : 2016/10/24
" Since : 2016/2/10
" Outline : AutoHotkeyの設定ファイル。(最近はこのコードをコンパイルできるみたい。)
@HayatoDoi
HayatoDoi / .vimrc
Last active October 30, 2016 22:22
" =====================================================
" testtest
" This program is for the Japanese.
" Therefore, comments are written in Japanese.
" All will be understood by reading the source code.
" =====================================================
" File name : .vimrc
" Author : Hayato Doi
" Last Update : 2016/10/27
" Since : 2015/9/28
@HayatoDoi
HayatoDoi / .zshrc
Last active October 24, 2016 11:08
# =====================================================
# This program is for the Japanese.
# Therefore, comments are written in Japanese.
# All will be understood by reading the source code.
# =====================================================
# File name : .zshrc
# Author : Hayato Doi
# Last Update : 2016/10/22
# Since : 2015/7/14
# Outline : zshの設定ファイル
# =====================================================
# This program is for the Japanese.
# Therefore, comments are written in Japanese.
# All will be understood by reading the source code.
# =====================================================
# File name : .tmux.conf
# Author : Hayato Doi
# Last Update : 2016/10/22
# Since : 2016/10/17
# Outline : tmuxの設定ファイル
/* file name : originalShell.c
* Author : 1517914 2EP2-31 Hayati Doi
* Outline : Operating System 1 , 2nd Report
* Copyright (c) 2016, Hayato Doi
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#!/usr/bin/env node
/* File name : scraping.js
* Author : Hayato Doi
* Last Update : 2017/1/11
* Since : 2017/1/11
* Outline : JSの監視されたくない??
* node.js version : v6.9.2
* Using the libraries : https://www.npmjs.com/package/cheerio-httpcli
* license : CC0-1.0
* Copyright (c) 2017, Hayato Doi
#!/usr/bin/env node
/* File name : syaroshikoBOT.js
* Author : Hayato Doi
* Last Update : 2017/2/7
* Since : 2017/2/7
* Outline : しゃろしこ!?
* node.js version : v6.9.5
* Using the libraries : https://www.npmjs.com/package/slackbots
* license : CC0-1.0
* Copyright (c) 2017, Hayato Doi

命名規則

  • file名 小文字のみ使用する。 [単語の区切りはハイフン]
  • class名 アッパーキャメルケース [複合語の先頭を,大文字で書き始める] ex) ClassNameIsHoge
  • 変数,プロパティ ローワーキャメルケース [複合語の先頭を,小文字で書き始める] ex) varNameIsFuga
  • 定数 すべて大文字(単語の区切りはアンダースコア) ex) TIME_LIMIT
  • Object/Array キーは基本的にクオートでくくらない
#!/usr/bin/env ruby
# Terminalに文字をピコピコ出すプログラム
# File name : terminal-picopico.rb
# Author : Hayato Doi
# license : CC0
#
# =================================================================
#
# @putsSleep() 引数に与えられた文字列を半秒表示して,消す.
# ユーザ作成
useradd "new user name"
# パスワードの設定
passwd "new user name"
# rootログインの禁止
echo "PermitRootLogin no" >> /etc/ssh/ssh_config
# sshの再起動
systemctl restart sshd.service