Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@guehara
guehara / slackredirect_remove.js
Created February 16, 2018 06:57
Slack Redirect URL remove for Tampermonkey
// ==UserScript==
// @name Slack Direct Link
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*.slack.com/messages/*
// @grant none
// ==/UserScript==
@guehara
guehara / .zshrc
Last active March 13, 2017 06:02
.zshrc for macOS
### zplug
source ~/.zplug/init.zsh
zplug 'zsh-users/zsh-completions'
zplug 'zsh-users/zaw'
zplug 'zsh-users/zsh-syntax-highlighting', defer:2
zplug check || zplug install
### cdr の設定 (zplug load 前に書かないと zaw-cdr がスキップされる)
autoload -Uz chpwd_recent_dirs cdr add-zsh-hook is-at-least
if is-at-least 4.3.10; then
@guehara
guehara / Cask
Created January 15, 2015 02:01
Cask for Emacs
(source gnu)
(source melpa)
(depends-on "auto-complete")
(depends-on "popup")
(depends-on "fuzzy")
(depends-on "auto-java-complete" :git "https://github.com/emacs-java/auto-java-complete.git")
(depends-on "ac-mozc" :git "https://github.com/igjit/ac-mozc.git")
(depends-on "helm")
@guehara
guehara / .tmux.conf
Created December 8, 2014 08:33
tmux.conf for OSX
# prefix キー変更
set -g prefix C-t
unbind C-b
# キーストロークのディレイを減らす
set -sg escape-time 1
# | でペインを縦に分割する
bind | split-window -h
Index: build_mozc.py
===================================================================
--- build_mozc.py (revision 383)
+++ build_mozc.py (working copy)
@@ -213,6 +213,8 @@
# Include subdirectory of win32 and breakpad for Windows
if options.target_platform == 'Windows':
gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR))
+ elif options.target_platform == 'Mac':
+ gyp_file_names.extend(glob.glob('%s/unix/emacs/*.gyp' % SRC_DIR))
@guehara
guehara / emacs-24.4_build.sh
Last active August 29, 2015 14:08
Build Emacs 24.4 on Yosemite
#!bin/sh
#
# reference from http://masutaka.net/chalow/2014-10-25-1.html
#
cd ~/src/emacs
curl -LO http://ftp.gnu.org/pub/gnu/emacs/emacs-24.4.tar.xz
curl -LO ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-24.4-mac-5.0.tar.gz
tar Jxvf emacs-24.4.tar.xz
tar zxvf emacs-24.4-mac-5.0.tar.gz
@guehara
guehara / emacs-24.3-fix-directory-for-mavericks.diff
Created December 9, 2013 00:24
emacs 24.3 fix directory for Mavericks
--- src/emacs.c.orig 2013-12-09 09:18:06.000000000 +0900
+++ src/emacs.c 2013-12-09 09:18:47.000000000 +0900
@@ -1158,6 +1158,11 @@
if (!noninteractive)
{
#ifdef NS_IMPL_COCOA
+ /* Started from GUI? */
+ /* FIXME: Do the right thing if getenv returns NULL, or if
+ chdir fails. */
+ if (! inhibit_window_system && ! isatty (0))
@guehara
guehara / helm-objc-headline.el
Created May 30, 2013 02:44
obj-c headline for helm
(defvar helm-c-source-objc-headline
'((name . "Objective-C Headline")
(headline "^[-+@]\\|^#pragma mark")))
(defun objc-headline ()
(interactive)
;; Set to 500 so it is displayed even if all methods are not narrowed down.
(let ((helm-candidate-number-limit 500))
(helm-other-buffer '(helm-c-source-objc-headline) "*ObjC Headline*")))
(global-set-key "\C-xp" 'objc-headline)
@guehara
guehara / Makefile
Created April 18, 2013 01:14
zcompile用
# -*- mode: makefile ; coding: utf-8-unix;
__ALL_SRC__ := $(wildcard *.zsh) .zshrc
TARGET :=$(__ALL_SRC__:%=%.zwc)
all: check $(TARGET)
check:
@chmod a-x $(__ALL_SRC__)
%.zwc: %
@guehara
guehara / static_analyze.sh
Created March 7, 2013 01:32
xcodebuild statis analyzer
#!/bin/sh
LATEST_VER=`xcodebuild -showsdks |sed -n -e 's/^.*sdk iphonesimulator\([0-9.]\{1,\}[^\n]\)$/\1/p'|sort|sed -n '$p'`
BUILD_CONFIG="Debug"
BUILD_OPTS="clean build"
OUTPUT_DIR="reports"
ANALYZE_OPTS="RUN_CLANG_STATIC_ANALYZER=YES CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR=${OUTPUT_DIR}"
if [ "$1" == ""]; then
exit