This file contains 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
! font | |
URxvt.allow_bold: false | |
URxvt*font: xft:RictyDiminishedDiscord-Regular:size=14:antialias=true | |
! Cursor | |
URxvt.cursorBlink: true | |
URxvt.cursorColor: #657b83 | |
URxvt.cursorUnderline: false | |
! setting |
This file contains 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
<?php | |
class Lazy | |
{ | |
public static function isClosure ($obj) | |
{ | |
return is_object($obj) && $obj instanceof Closure; | |
} | |
/** |
This file contains 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 magit-mode-setup-return-buffer (mode &rest args) | |
"Setup up a MODE buffer using ARGS to generate its content." | |
(let ((buffer (magit-mode-get-buffer mode t)) | |
(section (magit-current-section))) | |
(with-current-buffer buffer | |
(setq magit-previous-section section) | |
(setq magit-refresh-args args) | |
(funcall mode)) | |
(magit-display-buffer buffer) | |
(with-current-buffer buffer |
This file contains 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
;; project.clj | |
(defproject hogehoge "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:dependencies [[org.clojure/clojure "1.7.0"] | |
[clj-webdriver "0.7.2"] | |
[com.codeborne/phantomjsdriver "1.2.1" | |
:exclusion [org.seleniumhq.selenium/selenium-java | |
org.seleniumhq.selenium/selenium-server | |
org.seleniumhq.selenium/selenium-remote-driver]] |
This file contains 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
(def events [:move :press :move :move :release :press :release :press :press :move :move :move :release :move :move]) | |
(defn make-drag-filter-fn [] | |
(let [pressed? (atom false)] | |
(fn [event] | |
(cond | |
(and @pressed? (= :move event)) true | |
(= :press event) (do (reset! pressed? true) false) | |
(= :release event) (do (reset! pressed? false) false) | |
:else false)))) |
This file contains 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
#include <stdio.h> | |
int main() | |
{ | |
int a = 0; | |
int *ptr = &a; | |
printf("intsize = %d\n", sizeof(int)); | |
printf("base = %p\n", ptr); |
This file contains 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
#include <stddef.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
struct address | |
{ | |
char name[50]; | |
char street[50]; | |
int phone; |
This file contains 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 'cider) | |
(defun oneoff-cider-jack-in () | |
(interactive) | |
(if (null buffer-file-name) | |
(message "no file name") | |
(let ((cider-lein-parameters (format "oneoff --repl %s :headless" | |
(file-truename buffer-file-name)))) | |
(cider-jack-in)))) |
This file contains 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
#!escript | |
;; ライブラリの読み込み | |
;; Loading...と標準エラー出力に出てしまう(escript側で出ないようにしている) | |
(load-file (expand-file-name "~/.emacs.d/cli-util.el")) | |
(load-file (expand-file-name "~/.emacs.d/el-get/dash/dash.el")) | |
(load-file (expand-file-name "~/.emacs.d/el-get/s/s.el")) | |
;; 組み込みライブラリの読み込み | |
(require 'json) |
This file contains 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
;; cli utility functions | |
(defun println (str) | |
(princ (format "%s\n" str))) | |
(defun pp (obj) | |
(println (prin1-to-string obj))) |