Skip to content

Instantly share code, notes, and snippets.

View mahata's full-sized avatar
💭
On parenting...

Yasunori MAHATA mahata

💭
On parenting...
View GitHub Profile
@euske
euske / dip.md
Last active March 13, 2023 08:26
依存性逆転の原則 (Dependency Inversion Principle) と interface

依存性逆転の原則 (Dependency Inversion Principle) と interface

依存性逆転の原則とは

身近な例で考えてみよう。 あなたの会社は家庭用コンセントにつなぐ電気製品を開発している。 たまたま開発現場に Panasonic製のコンセントがあったので、 その差し込み口の寸法に合わせてプラグを設計した。 しかしこの方法には問題がある。Panasonic製のコンセントには ぴったり合っていたとしても、他社製のコンセントに対してはどうだろうか?

@lizthegrey
lizthegrey / attributes.rb
Last active September 24, 2024 14:33
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'

2018年4月でもって株式会社Fablicを退職します

3行要約

  • 2017-01 〜 2018-04までの1年ちょい、Fablic社でFRIL開発してたよ
  • そこでの体験は最高だったよ
  • 来年Vancouverに戻るまでの間の予定は現時点で未定だよ

これまで何をやってきたか

@prakhar1989
prakhar1989 / richhickey.md
Last active November 8, 2023 17:19 — forked from stijlist/gist:bb932fb93e22fe6260b2
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@dmytro
dmytro / ssh-multi.sh
Created October 31, 2012 03:46
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi
# D.Kovalov
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
starttmux() {
if [ -z "$HOSTS" ]; then
(defn zip [xs ys]
(lazy-seq (if (not-empty ys)
(cons [(first xs) (first ys)]
(zip (rest xs) (rest ys)))
(map (fn [i] [i nil]) xs))))
(defn f [xs]
(map (fn [[a b]]
(if (not (nil? b)) [a 0] [a 1]))
@bellbind
bellbind / parsegdata.js
Created February 29, 2012 07:49
[nodejs][jsdom][xml][gdata]search and parse data from youtube by node.js
// parsing youtube search gdata with jsdom
// [usage]
// npm install jsdom
// node youtubesearch.js > result.xml
// node parsegdata.js
var fs = require("fs");
var jsdom = require("jsdom");
// magic for applying querySelector/querySelectorAll
jsdom.jsdom("", null, {features: {QuerySelector: true}});
let x = char2nr(join(readfile('/dev/random', 'b', 1), '')[0]) % 3
if x == 0
echo "Ah?"
elseif x == 1
echo "Hm..."
else
echo "hard-to-speak-in-Vim-script!"
endif