Skip to content

Instantly share code, notes, and snippets.

View 10sr's full-sized avatar
👀
I may be slow to respond.

10sr 10sr

👀
I may be slow to respond.
View GitHub Profile
@10sr
10sr / a.md
Last active August 29, 2015 14:07
iptables

iptables

IP パケットのフィルタリングのルールを設定する。 Linux で使える。

類似なものとして firewall なるものがある。 Centos7 などで採用されており、裏側で iptables を使っている(らしい)。

Basics

@10sr
10sr / a.md
Last active August 29, 2015 14:05
Command to inspect commands

Porpose

コマンドの定義を調べるコマンドをまとめる。

  • 関数、aliasを調べられるか
  • 関数の定義内容を出力するか
  • ビルトインかどうか
@10sr
10sr / index.html
Last active August 29, 2015 14:04
bl.ocks.org Example
<a href="http://bl.ocks.org/10sr/9826e473e240aa96b9d6">link</a>
<a href="http://bl.ocks.org/10sr/raw/9826e473e240aa96b9d6/">link</a>
@10sr
10sr / vagrant-archlinux.md
Last active August 29, 2015 14:02
Vagrant box of Archlinux minimum installation on 2014/06/09

目的

  • Archlinux の Virtualbox 用 Vagrant box を作る。 http://www.vagrantbox.es にはすでにあるけど、サイズが 400M に近いサイズのものが多く、もっと減らせるのではと思った
  • 勉強

作業

@10sr
10sr / post.py
Last active August 29, 2015 14:00
Small CGI Uploader
#!/usr/bin/env python
# post.py --- Small Uploader
# datadir = "posted"
datadir = ""
FORM_HTML = """<form action="post.py" method="post" enctype="multipart/form-data" required>
<p><input type="file" name="content" value="" /></p>
<p>Name (optional) <input type="text" name="filename" /></p>

Untitled Slide

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

  • input key <- to go backward.
  • input key -> to go forward.

Publishing

@10sr
10sr / sshd_config.md
Last active August 29, 2015 13:57
SSHd Configurations

/etc/ssh/sshd_config

Disable PasswordAuthentication and ChallengeResponseAuthentication to disable password authentication.

Protocol 2
PermitRootLogin no

PasswordAuthentication no

[Unit]
Description=Network connectivity (eth0)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-eth0.device
After=sys-subsystem-net-devices-eth0.device
[Service]
Type=oneshot
RemainAfterExit=yes
@10sr
10sr / a.ahk
Last active January 1, 2016 21:58
; Maps for Numpads
; 8: zoomin
; 2: zoomout
; 5: grab
; 4: rotate left
; 6: rotate right
; 1: undo
; 3: redo
; 9: eraser
; 7: spoit