This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;;;;;;;; かきかえのやつ | |
| (import [android.widget TextView LinearLayout]) | |
| (. de.exterm.android.swank/handler | |
| (post (fn [] | |
| (let [context de.exterm.android.swank/context | |
| li (new LinearLayout context)] | |
| (.setOrientation li LinearLayout/VERTICAL) | |
| (let [tv (new TextView context)] | |
| (.setText tv "Hello, AAA") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| mesh = bpy.context.active_object.data | |
| uv_coord_list = [] | |
| bpy.ops.object.mode_set(mode='EDIT', toggle=False) | |
| bpy.ops.mesh.quads_convert_to_tris() | |
| bpy.ops.object.mode_set(mode='OBJECT', toggle=False) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| mesh = bpy.context.active_object.data | |
| uv_coord_list = [] | |
| bpy.ops.object.mode_set(mode='EDIT', toggle=False) | |
| bpy.ops.mesh.quads_convert_to_tris() | |
| bpy.ops.object.mode_set(mode='OBJECT', toggle=False) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-shell-port=9999 | |
| ;; telnet localhost 9999 | |
| ;; ChromeDevToolsHandshake | |
| ;; Destination: | |
| ;; Tool:DevToolsService | |
| ;; Content-Length:66 | |
| ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # lambda で Proc オブジェクトを作る | |
| def foo(v) | |
| f = lambda { |a, b| | |
| puts "#{a}, #{b}, #{v}" | |
| } | |
| end | |
| # Proc.new で Proc オブジェクトを作る | |
| def bar(v) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Usage: | |
| ;; | |
| ;; (defun snake-camel () (interactive)(kill-new(upcase-first(snake-to-camel(car kill-ring))))) | |
| ;; (defun camel-snake () (interactive)(kill-new(upcase(camel-to-snake(car kill-ring))))) | |
| (defun snake-to-camel (s) | |
| "" | |
| (setq s (downcase s)) | |
| (if (string-match "_" s) | |
| (concat (let ((fs (substring s 0 (match-beginning 0)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # tested on ubuntu12.04 server | |
| # this cannot perform on lion. lion's ed command does not have 'y' command. | |
| # rails new my-app | |
| # cd my-app | |
| # bash < <(curl -s https://raw.github.com/gist/2862788/ed729517cc94c3c3aee44bdbec1f3039184d5181/startup.sh) | |
| git init |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Register users and memberships to Redmine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *.elc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # . <(curl -L http://goo.gl/pdDKD) | |
| # e.g.: jked /etc/hosts:3: | |
| function jked { | |
| file=`echo "$@" | sed 's/[:]/ /g' | awk '{print $1}'` | |
| n=`echo "$@" | sed 's/[:]/ /g' | awk '{print $2}'` | |
| if echo "$n" | grep '^[0-9]*$'; then | |
| vi "$file" +"$n" | |
| else | |
| vi "$file" |