Skip to content

Instantly share code, notes, and snippets.

@nari-ex
nari-ex / get_header_and_status.sh
Last active August 29, 2015 14:10
get https header and status by curl
$ time curl -I -w '%{http_code}\n' http://192.0.2.3/index.php
@nari-ex
nari-ex / route_del.sh
Last active December 31, 2015 03:49
Mac 用 ルーティングテーブルを書き換えるスクリプト
#!/bin/sh
GATEWAY_IP=
# Gmail
sudo route -nv delete -host imap.googlemail.com ${GATEWAY_IP}
sudo route -nv delete -host smtp.googlemail.com ${GATEWAY_IP}
# J:COM Mail
sudo route -nv delete -host pop.jcom.home.ne.jp ${GATEWAY_IP}
@nari-ex
nari-ex / route_add.sh
Last active December 31, 2015 03:39
Mac 用 ルーティングテーブルを書き換えるスクリプト
#!/bin/sh
GATEWAY_IP=
# Gmail
sudo route -nv add -host imap.googlemail.com ${GATEWAY_IP}
sudo route -nv add -host smtp.googlemail.com ${GATEWAY_IP}
# J:COM Mail
sudo route -nv add -host pop.jcom.home.ne.jp ${GATEWAY_IP}
#!/bin/python
# coding: utf-8
import re, random, string, urllib, urllib2, BeautifulSoup
from django.utils import html
def get_yunyan():
# ゆーにゃんったーのURL
url = 'http://shindanmaker.com/128157'
#!/bin/bash
echo -e "let g:vimrc_local_finish = 1\nset langmenu=ja_ja.utf-8.macvim" > /Applications/MacVim.app/Contents/Resources/vim/vimrc
echo -e "let g:gvimrc_local_finish = 1" > /Applications/MacVim.app/Contents/Resources/vim/gvimrc
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import tweepy
from tweepy import Stream, TweepError
import logging
import urllib
CONSUMER_KEY=''
@nari-ex
nari-ex / build_jwhois.sh
Last active December 30, 2015 22:19
jwhois build
cd /usr/local/src/
wget http://ftp.de.debian.org/debian/pool/main/j/jwhois/jwhois_4.0.orig.tar.gz
tar xzvf jwhois_4.0.orig.tar.gz
cd jwhois-4.0/
wget http://www.fukatani.org/~hi-lo/blog/archives/upload_data/jwhois-4.0-fix-ipv6socket.patch
patch -p1 < jwhois-4.0-fix-ipv6socket.patch
mkdir /usr/local/jwhois
./configure --prefix=/usr/local/jwhois/
make -j4
make install