Skip to content

Instantly share code, notes, and snippets.

@suvene
suvene / install-ruby-debug-ubuntu-ruby-1.9.3
Created April 28, 2012 00:34 — forked from boriscy/install-ruby-debug-ubuntu-ruby-1.9.3
ruby-debug in ruby-1.9.3 and ubuntu
#To install ruby-debug on Ubuntu ruby-1.9.3 you need to download from http://rubyforge.org/frs/?group_id=8883
linecache19-0.5.13.gem
ruby_core_source-0.1.5.gem
ruby-debug19-0.11.6.gem
ruby-debug-base19-0.11.26.gem
#Then in your console
export RVM_SRC=/your/path/to/ruby-1.9.3
@suvene
suvene / gist:2601101
Created May 5, 2012 09:01
KeyRemap4MacBook for gvim
<?xml version="1.0"?>
<root>
<appdef>
<appname>GVim</appname>
<equal>org.vim.MacVim</equal>
</appdef>
<item>
<name>My GVim Hack</name>
<appendix>Change ESC to ESC + KANA</appendix>
@suvene
suvene / gist:4750480
Last active December 12, 2015 09:19
ActiveRecordHelper
ActiveRecordHelper
module ActiveRecordHelper
def flatten_conditions(conditions, op = "and")
return nil if conditions.empty?
ps = []
condition = conditions.collect do |c|
next if c.size < 1
ps += c[1..(c.size)]
"( #{c[0]} )"
@suvene
suvene / git-pull-rebase.txt
Created February 11, 2013 09:43
git rebaseについて
git pull について
http://dxd8.com/archives/218/
------
O-Show 2011-04-08 05:20
こんにちは。
git config branch.ブランチ名.mergeoptions “–no-ff”
で常にファストフォワードではないマージを行うことについて一つ。
@suvene
suvene / gist:5038282
Created February 26, 2013 13:07
query for redmine issue
select id, substr(subject, 1, 15), category_id, project_id, created_on from issues order by updated_on;
select issues.id, substr(subject, 1, 15), category_id, project_id, created_on
FROM `issues` INNER JOIN issue_statuses ist on ist.id = issues.status_id WHERE (1 = 1
and (issues.assigned_to_id = 3
and issues.start_date < '2013-02-11 00:00:00'
and ist.is_closed != 1))
;
@suvene
suvene / gist:5076262
Last active December 14, 2015 10:59
falcon スコープ
falcon スコープ
===============
対象範囲
---------------
- 売上登録
- 請求締
- 請求登録
- 入金登録
- 原価登録
@suvene
suvene / git-間違って削除したstashを戻す.mkd
Last active April 1, 2017 02:22
[git]間違って削除したstashを戻す
git fsck --unreachable | grep commit | cut -d\  -f3 | xargs git log --merges --no-walk --grep=WIP
git cherry-pick -n -m1 <SHA-1>
<?php
/** ClassLoader
*
* Based on SplClassLoader by PHP Standards Working Grounp
* <http://groups.google.com/group/php-standards/web/final-proposal>
*
* @author Sotaro Karasawa <[email protected]>
* @date 2010-12-02 18:59:39
*/
$ sqlplus
SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 7 20:22:46 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: <your username here>
Enter password: <your password here>
Connected to:
@suvene
suvene / gist:5832775
Created June 21, 2013 17:18
centos check priorities
sed -n -e "/^\[/h; /priority *=/{ G; s/\n/ /; s/ity=/ity = /; p }" /etc/yum.repos.d/*.repo | sort -k3n