Skip to content

Instantly share code, notes, and snippets.

View equinox79's full-sized avatar

Jun-ichiro Suzuki equinox79

View GitHub Profile
@equinox79
equinox79 / exec.sh
Last active December 28, 2015 20:59
CentOSにAnsibleでFabricを入れる(とりあえず動いたレベル)
ansible-playbook -i ./hosts install_fabric.yaml
@equinox79
equinox79 / gist:7212950
Created October 29, 2013 11:27
sourcetree uri scheme
sourcetree://checkoutRef?ref=master&cloneUrl=https://github.com/uzulla/yancha.git&type=bitbucket
sourcetree://checkoutRef?ref=master&cloneUrl=https://github.com/uzulla/pyazo.git&type=bitbucket
sourcetree://checkoutRef?ref=master&cloneUrl=git@github.com:equinox79/adreso.git&type=bitbucket
// $('.clone-url').each(function(a,b){ console.log( $(b).attr('data-protocol-type') ) })
@equinox79
equinox79 / fdcnt.pl
Last active December 23, 2015 19:39
プロセス毎のファイルディスクリプタ利用数を表示(5個以上開いているもののみ)
#!/usr/bin/env perl
#
# Name: fdcnt.pl
#
# Usage:
# $ sudo perl fdcnt.pl | sort -rn
#
# Licence: MIT
#
@equinox79
equinox79 / yancha-addHook.js
Created September 5, 2013 08:16
yanchaでhookを追加
hook.addHook('onUserMessage', function(hash){
if(hash.text.match(/[a-z]+/)){
console.log(hash.text);
}
});
@equinox79
equinox79 / gist:6447119
Created September 5, 2013 07:43
ポートスキャン
# rhel
nc -z -w 0 localhost 1-100 && echo 'ok' || echo 'ng'
@equinox79
equinox79 / doit
Created August 23, 2013 02:42 — forked from stantonk/doit
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
yum groupinstall "Development tools"
yum install zlib-devel
yum install bzip2-devel openssl-devel ncurses-devel
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar xf Python-2.7.3.tar.bz2
cd Python-2.7.3
@equinox79
equinox79 / gist:6163406
Last active December 20, 2015 16:39 — forked from ikawka/gist:4174481
install gitlab
su -
#dependcies
#centos 6.2 | http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-7.noarch.rpm
rpm -Uvh http://mirrors.ustc.edu.cn/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
yum -y groupinstall 'Development Tools' 'Additional Development'
yum -y install readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc sqlite-devel gcc-c++ libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel system-config-firewall-tui python-devel redis
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="defraggler" />
<package id="javaruntime" />
<package id="java.jdk" />
<package id="virtualbox" />
<package id="vagrant" />
<package id="Silverlight" />
<package id="winmerge" />
<package id="android-sdk" />
@equinox79
equinox79 / nata.pl
Created April 6, 2013 08:46
ちょっとだけ賢くて、諦めないtelnetコマンドを作りたい
#!/usr/bin/env perl
use strict;
use warnings;
use Term::ReadLine;
use IO::Socket;
use Data::Printer;
use Encode;
use Getopt::Long;
use Try::Tiny;
@equinox79
equinox79 / office365_bookmarklet.js
Last active December 10, 2015 06:48
office365_bookmarklet.js(つくりかけです/本当は作成ウィンドウに流し込みたいが無理っぽい)
// 選択した文字列をコピー&全員に返信
javascript:(function(){
var r = document.selection.createRange();
if(r.text.length > 0){
clipboardData.setData("Text", r.text.replace(/\n/g, "\n> ").replace(/^/g, "> "));
};
document.getElementById('imgReplyAllIcon').fireEvent("onclick");
})();
/*
javascript:(function(){ var r = document.selection.createRange(); if(r.text.length > 0){ clipboardData.setData("Text", r.text.replace(/\n/g, "\n> ").replace(/^/g, "> ")); }; document.getElementById('imgReplyAllIcon').fireEvent("onclick");})();