Skip to content

Instantly share code, notes, and snippets.

View ohneda's full-sized avatar

Yuichi Oneda ohneda

  • Fujisan Magazine Service USA
  • Berkeley CA, USA
View GitHub Profile
@swaroopch
swaroopch / flask-boilerplate-tmux.bash
Created December 5, 2010 07:00
A command that scripts a tmux session
#!/bin/bash
function flask-boilerplate-tmux
{
# https://github.com/swaroopch/flask-boilerplate
BASE="$HOME/code/flask-boilerplate"
cd $BASE
tmux start-server
tmux new-session -d -s flaskboilerplate -n model
*** lisp/term/ns-win.el.orig 2011-05-07 08:46:32.000000000 +0900
--- lisp/term/ns-win.el 2011-05-07 08:47:02.000000000 +0900
***************
*** 1530,1535 ****
--- 1530,1555 ----
(title . "半英")
(cursor-color)
(cursor-type))
+ ("com.justsystems.inputmethod.atok23.Roman"
+ (title . "A")
@kwappa
kwappa / emacs.rb
Created July 26, 2011 09:09
emacs 23.3a formula for homebrew with Xcode4.1 / Lion / --cocoa
require 'formula'
class Emacs < Formula
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3a.tar.bz2'
md5 'f2cf8dc6f28f8ae59bc695b4ddda339c'
homepage 'http://www.gnu.org/software/emacs/'
skip_clean :all
if ARGV.include? "--use-git-head"
@n-miyo
n-miyo / gist:1250669
Created September 29, 2011 12:53
patch for emacs-inline.patch: Use preferredLanguages instead of currentLocale.
diff --git a/src/macim.m b/src/macim.m
index d4444db..515cf25 100644
--- a/src/macim.m
+++ b/src/macim.m
@@ -100,7 +100,14 @@ DEFUN ("mac-toggle-input-source", Fmac_toggle_input_source,
}
else
{
- NSString *locale = [[NSLocale currentLocale] localeIdentifier];
+ NSString *locale;
@frbayart
frbayart / virt-manager_run.py
Created June 23, 2012 13:45
virt-manager on MACOSX
MBA-FBA:bin francois$ ./virt-manager
RuntimeWarning: tp_compare didn't return -1 or -2 for exception
RuntimeWarning: tp_compare didn't return -1 or -2 for exception
Traceback (most recent call last):
File "/Users/francois/bin/mybuild/share/virt-manager/virt-manager.py", line 393, in <module>
_show_startup_error(str(run_e), "".join(traceback.format_exc()))
File "/Users/francois/bin/mybuild/share/virt-manager/virt-manager.py", line 63, in _show_startup_error
from virtManager.error import vmmErrorDialog
File "/Users/francois/bin/mybuild/share/virt-manager/virtManager/error.py", line 173, in <module>
class _errorDialog (gtk.MessageDialog):
@matchy256
matchy256 / rec_radiko.sh
Last active October 31, 2023 08:23 — forked from saiten/rec_radiko.sh
簡易Radiko録音スクリプト
#!/bin/bash
LANG=ja_JP.utf8
pid=$$
date=`date '+%Y-%m-%d-%H_%M'`
outdir="."
if [ $# -le 1 ]; then
@kiy0taka
kiy0taka / gist:4387787
Last active December 10, 2015 05:28
GVM Grails/Griffon auto switch for zsh.
__gvm_switch() {
if [ -s "gradle.properties" ]; then
local candidate current target
candidate=grails
target=$(cat gradle.properties | grep --color=never 'grailsVersion' | sed "s_grailsVersion=\(.*\)_\1_g")
if [[ $target != '' ]]; then
current=$(eval echo '$'$(echo $candidate | tr '[:lower:]' '[:upper:]')_HOME | sed -e "s_$GVM_DIR/$candidate/__g")
if [[ $current != $target ]]; then
echo "Switching to $candidate $target ..."
gvm offline enable > /dev/null
@yasuyk
yasuyk / marked.el
Created January 16, 2013 09:45
emacsで編集中のmarkdownをmarkedでプレビューする
;; from http://support.markedapp.com/kb/how-to-tips-and-tricks/marked-bonus-pack-scripts-commands-and-bundles
(defun markdown-preview-file ()
"run Marked on the current file and revert the buffer"
(interactive)
(shell-command
(format "open -a /Applications/Marked.app %s"
(shell-quote-argument (buffer-file-name))))
)
(global-set-key "\C-cm" 'markdown-preview-file)
@sunaot
sunaot / exception.md
Created August 2, 2013 09:13
例外設計の話

例外設計の話。

こんな指針がいいのかなー 2013 夏 ver.

例外の目的とは?

.NET の「例外のデザインのガイドライン」にもこう書いてある。

<ivysettings>
<settings defaultResolver="downloadGrapes"/>
<resolvers>
<chain name="downloadGrapes">
<filesystem name="cachedGrapes">
<ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
<artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
</filesystem>
<!-- todo add 'endorsed groovy extensions' resolver here -->
<ibiblio name="codehaus" root="http://repository.codehaus.org/" m2compatible="true"/>