Skip to content

Instantly share code, notes, and snippets.

View ainame's full-sized avatar

Satoshi Namai ainame

View GitHub Profile
@syohex
syohex / japanese-hanakaku-region-only-katakana.el
Created September 15, 2013 10:11
japanese-region-only for only Katakana.
;;;###autoload
(defun japanese-hankaku-region-only-katakana (from to &optional ascii-only)
(interactive "r\nP")
(save-restriction
(narrow-to-region from to)
(save-excursion
(goto-char (point-min))
(while (re-search-forward "\\cK" nil t)
(let* ((zenkaku (preceding-char))
(zenkaku-str (char-to-string zenkaku))
 Build ./build/iPhoneSimulator-6.1-Development
 Compile /var/folders/nl/vdz7nrv12zj44kcjg_vmpr1r0000gn/T/motion_env20130830-12748-1c625u6.rb
2013-08-30 16:21:51.931 ruby[12824:f0f] No such file or directory -- /var/folders/nl/vdz7nrv12zj44kcjg_vmpr1r0000gn/T/motion_env20130830-12748-1c625u6.rb (LoadError)
2013-08-30 16:21:51.932 ruby[12824:f0f] *** Terminating app due to uncaught exception 'LoadError', reason: 'No such file or directory -- /var/folders/nl/vdz7nrv12zj44kcjg_vmpr1r0000gn/T/motion_env20130830-12748-1c625u6.rb (LoadError)
'
*** Call stack at first throw:
(
0 CoreFoundation 0x93cdbe8b __raiseError + 219
1 libobjc.A.dylib 0x9716852e objc_exception_throw + 230
2 ruby 0x0013a419 rb_rescue2 + 793
class Module
def wrap_package_private name
wraped_method = instance_method(name)
define_method(name) do |*args|
# check
puts "checking package_private: #{name}"
if true
e = NoMethodError.new("package private method is called from outside of the package")
e.set_backtrace caller
@rummelonp
rummelonp / 2012.md
Last active December 10, 2015 10:18
2012年振り返り

2012年振り返り

私生活

転職に伴い石川県から東京都に引っ越した

image

image

$ ->
game = new Main()
game.start()
#共通ライブラリ
#行列演算のための関数
##行列の和
addArray = (array1, array2) ->
array = []
len = array1.length
@syohex
syohex / cperl-imenu.el
Created November 8, 2012 09:25
my own perl imenu. Default imenu provides too many information for me
(defun my/cperl-imenu-create-index ()
(let (index)
;; collect subroutine
(goto-char (point-min))
(while (re-search-forward "^\\s-*sub\\s-+\\([^ ]+\\)" nil t)
(push (cons (format "Function: %s" (match-string 1))
(match-beginning 1)) index))
;; collect subtest
(goto-char (point-min))
@mori-dev
mori-dev / gist:2905306
Created June 10, 2012 12:33
emacs24.1 にあって emacs23.4 にない関数
Man-bookmark-jump
abbrev-edit-save-buffer
abbrev-edit-save-to-file
abbrev-table-empty-p
allout-auto-activation-helper
allout-setup
allout-widgets-mode
allout-widgets-setup
balance-windows-1
balance-windows-2
@shayarnett
shayarnett / README
Created May 10, 2012 13:13
Snippet generator for RubyMotion ctags
Generate ctags with `rake ctags`
Run snipper.rb
Put resulting ruby.snippets file where your snippet plugin can pick it up. (I'm using snipmate)
@chetan
chetan / yardoc_cheatsheet.md
Last active April 16, 2024 23:49
YARD cheatsheet
@rstacruz
rstacruz / index.md
Last active November 3, 2023 09:56
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one