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
@taichi
taichi / code_reading.md
Last active April 10, 2024 13:04
太一のコードの読み方メモ

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

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

コードを読むとは何か

  • コードを嗜む
  • コードを学ぶ
  • 武器を手に入れる
@philipashlock
philipashlock / userChrome.css
Created February 8, 2019 20:03
Firefox userChrome.css for use with Tree Style Tab on Mac OS
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Adapted from https://www.reddit.com/r/FirefoxCSS/comments/ao3ydl/configuring_firefox_for_tree_style_tab_usage/ */
/* hide native tabs and sidebar header */
#TabsToolbar-customization-target {
visibility: collapse;
}
@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
@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
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}
@rummelonp
rummelonp / percol_zsh.md
Created December 7, 2012 15:57
percol 入れて zsh と組み合わせたら超便利

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

だったので紹介

percol とは

percol は入力の1行を1候補として,部分一致かつ AND 検索で絞り込みし,選択した候補を出力するコマンドです.端的に言えば Emacs の anything.el のコマンド版です.
@msykiino
msykiino / Howto-XtraBackup.md
Created October 3, 2012 05:48
Doc - How to use XtraBackup
@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
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}}