Skip to content

Instantly share code, notes, and snippets.

@higaki
higaki / init.el
Last active January 5, 2017 04:32
;; 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))))))
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]
#include <iostream>
#include <vector>
class Super {
public:
Super(int v): value(v) {}
virtual int getValue() const {return value;}
protected:
\documentclass[a4paper]{jsarticle}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
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
<!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">
@higaki
higaki / clt.sh
Last active August 29, 2015 14:25
# 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)
[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
lsbom /var/db/receipts/com.apple.pkg.DeveloperToolsCLI.bom | awk '{print $1}' | xargs -s 2048 tar cvf /tmp/hoge.tar

-*- org -*-

app/views/layouts とは?

app/assets って全体に効くの?

rails g uploader Picture の uploader って?

carrierwave のコマンド(?) か?

_form.html.erb って render ‘form’ を置換するの?

render