Skip to content

Instantly share code, notes, and snippets.

View 10long's full-sized avatar

RytaroTsuji 10long

View GitHub Profile
@10long
10long / python
Created July 23, 2018 13:26
elliptic_curves_order_counter
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
@10long
10long / mandelbrot_gif.rb
Created October 27, 2017 01:25
mandebrot sets git animation
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
@10long
10long / .envrc
Created July 24, 2017 01:36 — forked from akamiya/ssh-multi-ec2
a script to ssh multiple servers over multiple tmux panes
#export AWS_ACCESS_KEY_ID="AWSのアクセスキー"
#export AWS_SECRET_ACCESS_KEY="AWSのシークレットアクセスキー"
use nix
@10long
10long / dos_detector側
Created June 12, 2015 09:03
Apache::Requestした結果
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}"
@10long
10long / csharp.el
Last active August 29, 2015 14:13
omnisharp設定
;;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)))
;; 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)
@10long
10long / geeknote.el
Created February 17, 2014 03:39
geeknote call inside emacs
;; 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))
@10long
10long / unicorn
Created February 3, 2012 09:32
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
@10long
10long / flymake-groovy.el
Created August 10, 2011 09:31 — forked from uehaj/flymake-groovy.el
flymake-groovy.el(GroovyServ version)
;;;; 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))