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
for (n <- 0 to 2000000000) { | |
val ns = for (m <- 1 to 5) yield { | |
(n * m).toString.sorted | |
} | |
if (ns.distinct.length == 1) println(n) | |
} |
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 'anything) | |
;;; (install-elisp "http://nschum.de/src/emacs/split-root/split-root.el") | |
(require 'split-root) | |
(defun my-anything-display-function (buf) | |
(set-window-buffer (split-root-window 10) buf)) | |
(setq anything-display-function 'my-anything-display-function) | |
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
define_webjump("alc", | |
"javascript:location.href='http://eow.alc.co.jp/%s/UTF-8/?ref=sa';"); |
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
(in-package :stumpwm) | |
(defcommand conkeror () () | |
(run-or-raise "~/bin/conkeror" '(:class "Conkeror"))) | |
(define-key *root-map* (kbd "f") "conkeror") | |
(defcommand conkeror-new-buffer () () | |
(run-shell-command "conkeror")) | |
(define-key *root-map* (kbd "F") "conkeror-new-buffer") |
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
#!/bin/sh | |
curl http://www.ryutsuu.biz/index.html 2> /dev/null|\ | |
grep \<li\>\<a\ href=\"http://www |\ | |
grep \<span |\ | |
sed -e 's/<[a-z0-9\.:\/= \"]*>//g' |
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 anything-emms-directory-candidates-cache nil) | |
(defvar anything-emms-file-candidates-cache nil) | |
(defun anything-my-emms-clear-cache () | |
(interactive) | |
(setq anything-emms-directory-candidates-cache nil | |
anything-emms-file-candidates-cache nil)) | |
(defun anything-get-emms-directory-candidates () | |
(cond ((null anything-emms-directory-candidates-cache) |
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
(defun my-emms-current-track-path () | |
"get current track file as fullpath" | |
(emms-track-description (emms-playlist-current-selected-track))) | |
(defun my-insert-current-track () | |
(interactive) | |
(multiple-value-bind (artist album song) | |
(last (split-string (my-emms-current-track-path) "/") 3) | |
(insert (format "きいてる %s - %s from %s" song artist album)))) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
import subprocess | |
def do_sed(fullpath, old, new): | |
sed_script = "s/%s/%s/g" % (old, new) | |
command = ["sed", "-i", fullpath, "-e", sed_script] |
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
javascript:void((function () { | |
var url = location.href; | |
var ja = url.search(/hl=ja/); | |
var en = url.search(/hl=en/); | |
if (url.search(/google\.(co\.jp|com)\/search/) < 0) return; | |
if (ja > 0) { | |
location.href = url.replace(/hl=ja/, "hl=en"); | |
} else if (en > 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
(defvar my-py-docs-python-org-url "http://docs.python.org") | |
(defun my-py-search-documentation-interactive (word) | |
(interactive "sSEARCH: ") | |
(my-py-search-documentation word)) | |
(defun my-py-search-documentation-at-point () | |
(interactive) | |
(let ((word (current-word))) | |
(when word |