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

コンセプト

  • 柔軟性向上
  • 予想以上に複雑な使い方をしているケースが多かったので、設定ファイルも複雑化して対応する
Example#1:
{{#is_alert}}sample error message @jay@datadog @slack-ops-test {{/is_alert}}
Example#2:
sample error message
{{#is_alert}} @jay@datadog @slack-ops-test @pagerduty {{/is_alert}}
@takaxp
takaxp / emacs-mac-port-build.sh
Last active February 27, 2017 00:07
Build self-contained EMP with some custom variables (25.1 and RCs for 25.2)
#!/bin/sh
# The original script is here: https://gist.githubusercontent.com/railwaycat/10988446/raw/990dde69ea728b9ceff68dd649ad2112c5692ef0/build-emacs.app.sh
rootdir=$HOME/Desktop/emacs_mac_port
if [ ! -d $rootdir ]; then
mkdir $rootdir
fi
installprefix=$rootdir/build
app_dir=$installprefix/Emacs.app/Contents/Resources
source_url=ftp://alpha.gnu.org/gnu/emacs/pretest
@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 のコマンド版です.
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