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 / 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 / create_issue.sh
Created March 7, 2013 01:31
Gitlab API create issue memo
#!/bin/sh
curl -L -X POST -d '{"private_token":"xxxxxxxxxxxxxxxxx","title":"title", "description":"description"}' http://gitlab.host/api/v3/projects/ape/issues
@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
@guehara
guehara / helm-consadole-uniform-number-2013.el
Last active December 14, 2015 05:29
helm-consadole-uniform-number-2013
;; Original Source
;; http://niku.name/articles/diary/2013/02/21/helm%E3%81%A7%E3%82%B3%E3%83%B3%E3%82%B5%E3%83%89%E3%83%BC%E3%83%AC%E6%9C%AD%E5%B9%8C2013%E3%82%B7%E3%83%BC%E3%82%BA%E3%83%B3%E9%81%B8%E6%89%8B%E8%83%8C%E7%95%AA%E5%8F%B7%E3%82%92%E6%8E%A2%E3%81%99
(defvar helm-consadole-uniform-number-2013-source
'((name . "consadole sapporo uniform number 2013")
(candidates . (("1 GK 曵地 裕哉")
("16 GK イ ホスン")
("21 GK 阿波加 俊太")
("30 GK 杉山 哲")
("2 DF 日高 拓磨")
@guehara
guehara / emacs-xcode-document-viewer.diff
Created October 12, 2012 02:32
emacs-xcode-document-viewer patch for Xcode 4.5
--- xcode-document-viewer.el.orig 2012-10-12 11:25:14.000000000 +0900
+++ xcode-document-viewer.el 2012-10-12 11:19:19.000000000 +0900
@@ -48,7 +48,7 @@
(defcustom xcdoc:document-path nil
"please set docset full path like:
-\"/Developer/Platforms/iPhoneOS.platform/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleiPhone3_1.iPhoneLibrary.docset\"")
+\"/Developer/Platforms/iPhoneOS.platform/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleiPhone6.0.iPhoneLibrary.docset\"")
(defcustom xcdoc:open-w3m-other-buffer nil
@guehara
guehara / gist:3445212
Created August 24, 2012 03:40
minor-mode-alistから長すぎるのを削る
; abbrevとか長すぎる
(setcar (cdr (assq 'abbrev-mode minor-mode-alist)) " Ab")
; Flymakeも短く
(add-hook 'flymake-mode-hook
(lambda ()
(setcar (cdr (assq 'flymake-mode minor-mode-alist)) " Fly")))