Skip to content

Instantly share code, notes, and snippets.

View kozo2's full-sized avatar

Kozo Nishida kozo2

View GitHub Profile
@naota
naota / roman.t-code.el
Created December 22, 2010 16:39
roman.t-code.el
(with-current-buffer (get-buffer-create "roman.t-code.txt")
(dolist (x '(
((("1" "1"))("■"))
((("2" "1"))("■"))
((("3" "1"))("■"))
((("4" "1"))("■"))
((("5" "1"))("■"))
((("6" "1"))("■"))
((("7" "1"))("■"))
((("8" "1"))("■"))
(custom-set-faces
'(cfw:face-title ((t (:foreground "#f0dfaf" :weight bold :height 2.0 :inherit variable-pitch))))
'(cfw:face-header ((t (:foreground "#d0bf8f" :weight bold))))
'(cfw:face-sunday ((t :foreground "#cc9393" :background "grey10" :weight bold)))
'(cfw:face-saturday ((t :foreground "#8cd0d3" :background "grey10" :weight bold)))
'(cfw:face-holiday ((t :background "grey10" :foreground "#8c5353" :weight bold)))
'(cfw:face-default-content ((t :foreground "#bfebbf")))
'(cfw:face-regions ((t :foreground "#366060")))
'(cfw:face-day-title ((t :background "grey10")))
'(cfw:face-periods ((t :foreground "#8cd0d3")))
--- Spawns cmd if no client can be found matching properties
-- If such a client can be found, pop to first tag where it is visible, and give it focus
-- @param cmd the command to execute
-- @param properties a table of properties to match against clients. Possible entries: any properties of the client object
function run_or_raise(cmd, properties)
local clients = client.get()
local focused = awful.client.next(0)
local findex = 0
local matched_clients = {}
local n = 0
--- s.vim.before 2011-05-14 14:12:34.000000000 +0900
+++ s.vim.after 2011-05-14 14:12:27.000000000 +0900
@@ -21,7 +21,6 @@
" Basic {{{
-"set no compatible
set nocompatible
"reset
@mopemope
mopemope / pavement.py
Created March 10, 2012 15:16
vcs update task
from __future__ import with_statement
from paver.easy import *
from paver.svn import update as svnupdate
import os
def run_svn(dir):
print "svn update %s" % dir
sh('svn up')
def run_hg(dir):
@yoshinari-nomura
yoshinari-nomura / gist:3465571
Created August 25, 2012 13:20
Font setup for Cocoa Emacs24
(when (and (>= emacs-major-version 24)
(eq window-system 'ns))
;; フォントセットを作る
(let* ((fontset-name "myfonts") ; フォントセットの名前
(size 14) ; ASCIIフォントのサイズ [9/10/12/14/15/17/19/20/...]
(asciifont "Menlo") ; ASCIIフォント
(jpfont "Hiragino Maru Gothic ProN") ; 日本語フォント
(font (format "%s-%d:weight=normal:slant=normal" asciifont size))
(fontspec (font-spec :family asciifont))
(jp-fontspec (font-spec :family jpfont))
@johnmyleswhite
johnmyleswhite / bfs_dfs.jl
Last active February 3, 2022 19:29
BFS and DFS for DAG's in Julia
function bfs(start_node::Any,
next_nodes::Function,
at_node::Function)
to_process = Array(Any, 0)
depths = Array(Int, 0)
push!(to_process, start_node)
push!(depths, 0)
while !isempty(to_process)
@keiono
keiono / load_kegg.py
Created December 13, 2013 04:47
Load multiple files
from java.io import File
KEGG_DIR = "/Users/kono/kegg/"
pathways = ["hsa00010.xml", "hsa00020.xml", "hsa01100.xml"]
loadNetworkTF = cyAppAdapter.get_LoadNetworkFileTaskFactory()
taskManager = cyAppAdapter.getTaskManager()
allTasks = None
for pathway in pathways:
#!/bin/bash
case $1 in
config)
cat <<'EOM'
graph_category system
graph_title energy
graph_vlabel Energy Watt
graph_args --base 1000 -l 0
package.label Package
@keijiro
keijiro / XPS13-Ubuntu.md
Last active May 22, 2019 04:00
Dell XPS 13 (2015) に Ubuntu を入れる

2015/4/24 追記 - Ubuntu 15.04 (Vivid Vervet) では特に工夫しなくともすんなり動作するようになった模様です。ということで、インストール時には 15.04 を選ぶようにしましょう。

下記は 14.04 向けの古い情報となります。


XPS 13

Dell の XPS 13 (2015) に Ubuntu を入れたら幸せになれるのではないか。そんな気がしたので入れてみたのですが、案外に気をつけるべきポイントが多いので、手順を書き記しておきます。