This file contains 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
class Point: | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y | |
class EC: | |
def __init__(self, a1, a2, a3,a4,a6, p): | |
self.a1 = a1 | |
self.a2 = a2 |
This file contains 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
def mandelbrot?(z,c,nn) | |
for n in 1 .. nn | |
z = z ** 2 + c | |
if z.real.infinite? || z.real.infinite? || z.imag.infinite? || z.imag.nan? | |
return [false, n] | |
end | |
end | |
[true, n] | |
end |
This file contains 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
#export AWS_ACCESS_KEY_ID="AWSのアクセスキー" | |
#export AWS_SECRET_ACCESS_KEY="AWSのシークレットアクセスキー" | |
use nix |
This file contains 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
r = Server::Request.new | |
s = Server::Server.new | |
c = Server::Connection.new | |
Server.echo "hostname: " + r.hostname | |
Server.echo "hello world" | |
Server.echo "documento_root: #{r.document_root}" | |
r.document_root = "/tmp" | |
Server.echo "documento_root: #{r.document_root}" | |
Server.echo "path: #{s.path}" | |
Server.echo "remote ip: #{c.remote_ip}" |
This file contains 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
;;install unity | |
;;brew install mono | |
;;https://github.com/OmniSharp/omnisharp-server#osx--linux | |
;;unity sln sync | |
(add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode)) | |
(add-hook 'csharp-mode-hook | |
#'(lambda () | |
(omnisharp-mode) | |
(ac-common-setup))) |
This file contains 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
;; goto jump ================================================================== | |
(defun jump-next-line-n (n) | |
(interactive "nnext:") | |
(next-line n)) | |
(defun jump-prev-line-n (n) | |
(interactive "nnext:" ) | |
(previous-line n)) | |
(global-set-key (kbd "M-n") 'jump-next-line-n) | |
(global-set-key (kbd "M-p") 'jump-prev-line-n) |
This file contains 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
;; geeknote ============================================================== | |
(defun geeknote-mode () | |
(interactive) | |
(eshell-command "python ~/geeknote/geeknote.py settings --editor /Applications/Emacs.app/Contents/MacOS/bin/emacsclient") | |
) | |
(defun geeknote-create (newnote) | |
(interactive "sname: ") | |
(eshell-command | |
(format "python ~/geeknote/geeknote.py create --content WRITE --title %s" newnote)) |
This file contains 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
#!/bin/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
This file contains 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
;;;; flymake for groovy | |
(require 'flymake) | |
(setq exec-path | |
(cons "/tool/groovyserv-0.4/bin" exec-path)) | |
;; Invoke groovyclient for compile with syntax checking | |
(defun flymake-groovy-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) |