This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar yari-helm-source-ri-pages | |
'((name . "RI documentation") | |
(candidates . (lambda () (yari-ruby-obarray))) | |
(action ("Show with Yari" . yari)) | |
(candidate-number-limit . 300) | |
(requires-pattern . 2) | |
"Source for completing RI documentation.")) | |
(defun yari-helm (&optional rehash) | |
(interactive (list current-prefix-arg)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use strict; | |
use warnings; | |
sub unagi_nqueen { | |
my $n = shift; | |
my $answer = []; | |
_nqueen([], $n, 0, $answer); | |
_unagi_filter($n, $answer); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use strict; | |
use warnings; | |
use Class::Inspector; | |
use Moose; | |
use LWP::UserAgent; | |
use Benchmark qw/cmpthese/; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ELISP> (pcomp:get-methods "Data::MessagePack") | |
("Data::MessagePack::utf8" "Data::MessagePack::unpack" "Data::MessagePack::true" "Data::MessagePack::prefer_integer" "Data::MessagePack::pack" "Data::MessagePack::new" "Data::MessagePack::get_utf8" "Data::MessagePack::get_prefer_integer" "Data::MessagePack::get_canonical" "Data::MessagePack::false" "Data::MessagePack::encode" "Data::MessagePack::decode" "Data::MessagePack::canonical" "Data::MessagePack::bootstrap" "Data::MessagePack::CLONE") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Acme::Jiro | |
Acme::MomoiroClover | |
Algorithm::Diff | |
Amon2 | |
Amon2::DBI | |
Amon2::Plugin::LogDispatch | |
Amon2::Plugin::Web::MobileAgent | |
Any::Moose | |
AnyEvent | |
AnyEvent::FriendFeed::Realtime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ./print_methods.sh Moose Furl Text::Xslate | |
Moose::after | |
Moose::around | |
Moose::as | |
Moose::augment | |
Moose::before | |
Moose::blessed | |
Moose::bootstrap | |
Moose::class_type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## show git branch at right prompt | |
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' formats '[%b]' | |
zstyle ':vcs_info:*' actionformats '(%s)-[%b|%a]' | |
precmd () { | |
psvar=() | |
LANG=en_US.UTF-8 vcs_info | |
is_fine=0 | |
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function git_is_rebasing() { | |
local topdir=$(git rev-parse --show-toplevel 2>/dev/null) | |
if [ $? -eq 0 ]; then | |
if [ -d $topdir/.git/rebase-merge ]; then | |
echo "$ZSH_THEME_GIT_PROMPT_REBASING" | |
fi | |
fi | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'notifications) | |
(notifications-notify :title "hoge" :body "fuga") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'popup) | |
(defun cui-about (user) | |
(with-temp-buffer | |
(let* ((url (format "http://cui-about.me/%s" user)) | |
(cmd (format "curl %s" url)) | |
(ret (call-process-shell-command cmd nil t nil))) | |
(unless (= ret 0) | |
(error (format "Failed: %s" cmd))) | |
(goto-char (point-min)) |