Skip to content

Instantly share code, notes, and snippets.

@a2ikm
a2ikm / p4d-20120129.txt
Created January 29, 2012 08:23
SELECT系SQLでできることとかActiveRecordでできること - p4dでの資料
SELECT系SQLでできることとかActiveRecordでできること
# people
* name : 名前(文字列)
* age : 年齢(整数)
| id | name | age |
| 1 | John | 18 |
| 2 | Ben | 27 |
@abo-abo
abo-abo / org-agenda-quick-jump
Created July 20, 2013 11:35
org-mode agenda quick month/year selection with hjkl and 0-9.
(defvar lawlist-month)
(defvar lawlist-year nil)
(defun lawlist-org-agenda-view-mode-dispatch ()
"Select the month in agenda view."
(interactive)
(message "View: [1-9] [o]CT [n]OV [d]EC, j(next), k(prev).")
(let* ((a (read-char-exclusive))
(year (or lawlist-year
(setq lawlist-year
@tsu-nera
tsu-nera / topcoder_define.h
Last active December 20, 2015 16:19
TopCoder Define
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;

SWIM: スケーラブルな弱一貫性,伝染様式プロセスグループメンバーシッププロトコル[和訳]

update

2014-01-26

version

0.1


原題: SWIM: Scalable Weakly-consistent Infection-style Process Group Membership Protocol

@kohske
kohske / rmarkdown-to-html
Created February 21, 2014 03:02
emacsでknit2html
(defun rmarkdown-to-html ()
"Run knitr::knit2html on the current file"
(interactive)
(shell-command
(format "Rscript -e \"knitr::knit2html('%s')\""
(shell-quote-argument (buffer-file-name)))))
@zk-phi
zk-phi / setup_description_ja.org
Last active October 16, 2022 13:54
[Emacs] setup.el で安全・爆速な init.el を書く

[Emacs] setup.el で安全・爆速な init.el を書く

Emacs プラグイン setup.el は、安全・爆速な設定ファイルを書くためのマク ロ集です。

ここでいう「安全」とは、「セットアップの途中でエラーが出て、ほとんどデ フォルトの Emacs が立ち上がる」ような悲劇が起きないことをいいます。

setup.el を使って書かれた設定ファイルがどれくらい爆速かというと、 5000 行以上の設定が入った Emacs が 0.29 秒でセットアップできるくらい爆速です。

@akiym
akiym / online-ctf.md
Created September 11, 2014 15:55
オンラインCTFまとめ
@esehara
esehara / oogiri.py
Created April 25, 2015 04:40
メカ大喜利マン ver 0.1
# -*- coding: utf-8 -*-
from gensim.models import word2vec
import MeCab
import random
model = word2vec.Word2Vec.load("oogiri_gensim.model")
tagger = MeCab.Tagger("-Ochasen")
def word_and_kind_parse(line):
line_word = line.split("\t")
if len(line_word) < 2:
@duggan
duggan / cast.py
Last active November 28, 2020 21:55
Using pychromecast to headlessly stream youtube videos
#!/usr/bin/env python
"""
Requires pychromecast.
Install with `pip install pychromecast`
usage: cast.py [-h] -d DEVICE -v VIDEO
Cast YouTube videos headlessly.
@snatchev
snatchev / gh.fish
Last active May 22, 2022 06:57
a fish-shell function to open the current git repo/branch in a browser
function gh --description 'Open the webpage for the current github repo/branch'
set -l fetch_url (command git remote --verbose show -n origin ^/dev/null | command grep Fetch | cut -c 14- )
#did we get an exit status?
if [ $status -gt 0 ]
echo 'Not a git repo.'
return 1
end
if [ -z $fetch_url ]