Skip to content

Instantly share code, notes, and snippets.

View takahiro47's full-sized avatar

Takahiro Tsuchiya takahiro47

  • CPSF, Tokuda Lab, Environment and Information Studies, Keio University SFC.
  • Tokyo, Japan
View GitHub Profile
#-------------------------------------
# 基本設定
#-------------------------------------
set-option -g status on
set-option -g status-interval 2
set-option -g status-justify "left"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/.tmux/tmux-powerline/powerline.sh left)"
## zplug
##----------------------------------##
export ZPLUG_HOME=/usr/local/opt/zplug
source $ZPLUG_HOME/init.zsh
zplug 'zplug/zplug', hook-build:'zplug --self-manage'
# enhancd config
export ENHANCD_COMMAND=ed
@takahiro47
takahiro47 / CompTIA_Security+.md
Created December 22, 2016 07:24
資格取得用メモ

Security+

Certification by CompTIA

List of TCP and UDP port numbers

Port No. TCP UDP Protocol Description
9 UDP Wake-on-LAN
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@takahiro47
takahiro47 / copy-into-browser.js
Created August 11, 2016 04:03 — forked from techieshark/copy-into-browser.js
jquery-and-lodash-in-console
// For quickly trying things out in the browser, jQuery and Lo-Dash (like Underscore.js) are great.
// Read the code below (never copy & paste code you don't trust),
// then you can copy & paste it into the browser console to load jQuery & lodash.
(function () {
var jq = document.createElement('script');
jq.src = 'https://code.jquery.com/jquery-2.1.4.js';
@takahiro47
takahiro47 / eratosthenes.coffee
Created August 1, 2014 06:39
エラトステネスの篩のワンライナー
## Solution 1
x = 1000
primes = []
primes.push i for i in [2..x] when not (j for j in primes when i % j == 0).length
## Solution 2
# 洗練する前
# (n) -> (p.push i for i in [2..n] when not (j for j in (p or p=[]) when i%j == 0)[0]) and n in p
@takahiro47
takahiro47 / alert.js
Created August 1, 2014 03:08
alert.js
_=-~-~-~[];__=[][(![]+[])[_-_]+([][[]]+[])[_+_-_/_]+(![]+[])[_-_/_]+(!![]+[])[_-_]+(!![]+[])[_]+(!![]+[])[_/_]]+[];___=__[_]+__[_+_]+__[_-_/_]+(![]+[])[_]+(!![]+[])[_-_]+(!![]+[])[_/_]+(!![]+[])[_-_/_]+__[_]+(!![]+[])[_-_]+__[_+_]+(!![]+[])[_/_];___[___][___]((![]+[])[_/_]+(![]+[])[(_+_)/_]+(!![]+[])[_]+(!![]+[])[_/_]+(!![]+[])[_-_]+"(\""+'\\'+(([][[]]+[])[_-_])+(_)+(_-_)+(_+_/_)+(_+_)/_+"\");")();
@takahiro47
takahiro47 / FizzBuzz.coffee
Last active August 29, 2015 14:04
FizzBuzz.coffee
# 2014/08/01 11:44:01
#
# Run:
# $ coffee main.coffee
#
# Question: "FizzBuzz問題"
# http://d.hatena.ne.jp/keyword/Fizz-Buzz%CC%E4%C2%EA
# を解くプログラムを作成し、GitHub, Gist, 個人Webページなどにアップして下さい。
## Solution 1
module.exports = (grunt) ->
'use strict'
require 'coffee-script'
require 'coffee-errors'
# Load grunt tasks automatically
require('load-grunt-tasks') grunt,
scope: 'devDependencies'
@takahiro47
takahiro47 / jenkins.css
Last active December 11, 2015 02:55
jenkins.css
body {
background-color: #205081;
}
table, form, input, td, th, p, textarea, select {
font-family: Arial, sans-serif;
font-size: 12px;
}
h1, h2, h3, h4, h5, h6 {