Skip to content

Instantly share code, notes, and snippets.

View n0ts's full-sized avatar
🏠
Working from home

Naoya Nakazawa n0ts

🏠
Working from home
  • Freelancer
  • Tokyo, Japan
  • X @n0ts
View GitHub Profile
#!/bin/bash
export LANG=C
for service in $(/sbin/chkconfig --list | grep 3:on | awk '{ print $1 }')
do
while :
do
echo -n "disable $service ?: "
read answer
case $answer in
Y|y)
@rust
rust / emacs.rb
Created August 6, 2011 03:59 — forked from pingles/emacs.rb
Homebrew Emacs for OSX Lion with native full-screen
require 'formula'
class Emacs < Formula
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3a.tar.bz2'
md5 'f2cf8dc6f28f8ae59bc695b4ddda339c'
homepage 'http://www.gnu.org/software/emacs/'
if ARGV.include? "--use-git-head"
head 'git://repo.or.cz/emacs.git'
else
@anekos
anekos / zsh-history-to-autojump.rb
Created March 7, 2012 06:34
zsh の履歴ファイルから、autojump のカウントファイル(?)に追加する (ruby1.9)
#!/usr/bin/ruby
# vim:set fileencoding=utf-8 :
require 'shellwords'
ARGF.each do
|line|
line.chomp!
line.sub!(/\A.+?;/, '') rescue next
next unless m = line.match(/\Acd\s+(~?\/.*)/)
@frsyuki
frsyuki / fluentd-v11-design.md
Created May 8, 2012 19:31
Fluentd v0.11 の設計案

Fluentd v11 設計案

We made it possible. Next, we'll make it beautiful.

Suffering-oriented programming

コンセプト

  • 柔軟性向上
  • 予想以上に複雑な使い方をしているケースが多かったので、設定ファイルも複雑化して対応する
@taichi
taichi / code_reading.md
Last active April 10, 2024 13:04
太一のコードの読み方メモ

太一のコードの読み方メモ

全体として太一が感覚的に実践している事を論理的に説明しようと試みている為、
説明の粒度が適切でなかったり一貫性が無いように見える部分があるかもしれない。
普段やっているけども書ききれていない事も多分きっとある。

コードを読むとは何か

  • コードを嗜む
  • コードを学ぶ
  • 武器を手に入れる
@msykiino
msykiino / Howto-XtraBackup.md
Created October 3, 2012 05:48
Doc - How to use XtraBackup
@rummelonp
rummelonp / percol_zsh.md
Created December 7, 2012 15:57
percol 入れて zsh と組み合わせたら超便利

percol 入れて zsh と組み合わせたら超便利

だったので紹介

percol とは

percol は入力の1行を1候補として,部分一致かつ AND 検索で絞り込みし,選択した候補を出力するコマンドです.端的に言えば Emacs の anything.el のコマンド版です.
@ksafranski
ksafranski / expecting.md
Last active November 11, 2023 23:00
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect
anonymous
anonymous / emacs24_3_inline_memleak.sh
Created January 22, 2014 04:06
emacs 24.3でdistnotedを暴走させないパッチ+inlineパッチのビルド手順です。sakito.jpの手順を修正したものです。
EMACS_VER=24.3
curl -O http://ftp.gnu.org/pub/gnu/emacs/emacs-${EMACS_VER}.tar.gz
curl -O https://gist.github.com/anonymous/8553178/raw/c0ddb67b6e92da35a815d3465c633e036df1a105/emacs.memory.leak.aka.distnoted.patch.diff
svn co http://svn.sourceforge.jp/svnroot/macemacsjp/inline_patch/trunk inline_patch
tar xvfz emacs-${EMACS_VER}.tar.gz
cd emacs-${EMACS_VER}
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu