-*- org -*-
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
| ;; load path | |
| (defun add-to-load-path (&rest paths) | |
| (let (path) | |
| (dolist (path paths paths) | |
| (let ((default-directory | |
| (expand-file-name (concat user-emacs-directory path)))) | |
| (add-to-list 'load-path default-directory) | |
| (if (fboundp 'normal-top-level-add-subdirs-to-load-path) | |
| (normal-top-level-add-subdirs-to-load-path)))))) |
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
| def jangkeng(you, comp) | |
| (you - comp + 4) % 3 - 1; | |
| end | |
| rock, paper, scissors = 0, 1, 2 | |
| win, lose, draw = 1, -1, 0 | |
| matches = [ | |
| # [you, comp, judge] |
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
| #include <iostream> | |
| #include <vector> | |
| class Super { | |
| public: | |
| Super(int v): value(v) {} | |
| virtual int getValue() const {return value;} | |
| protected: |
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
| \documentclass[a4paper]{jsarticle} | |
| \usepackage[T1]{fontenc} | |
| \usepackage{lmodern} |
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
| def fizzbuzz | |
| Enumerator.new do |y| | |
| i = 1 | |
| loop do | |
| y << case | |
| when i % 15 == 0 then "FizzBuzz" | |
| when i % 5 == 0 then "Buzz" | |
| when i % 3 == 0 then "Fizz" | |
| else i | |
| end |
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
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>date picker</title> | |
| <link rel="stylesheet" href="pikaday.css"> | |
| <link rel="stylesheet" href="site.css"> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> |
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
| # Yosemite 用 MacPorts をインストール | |
| MacPorts-2.3.3-10.10-Yosemite.pkg | |
| # Yosemite 用 command line tools をインストール | |
| xcode-select --install | |
| port outdated | |
| # ... | |
| # => zlib 1.2.8_0 < 1.2.8_0 (platform darwin 12 != darwin 14) |
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
| [alias] | |
| l = log --date=short --pretty=format:\"%h\t%an\t%ai %s\" | |
| s = status | |
| d = diff | |
| a = add | |
| b = branch | |
| c = commit | |
| co = checkout |
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
| lsbom /var/db/receipts/com.apple.pkg.DeveloperToolsCLI.bom | awk '{print $1}' | xargs -s 2048 tar cvf /tmp/hoge.tar |