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
import requests | |
requests.post("http://maker.ifttt.com/trigger/HOGEHOGE/with/key/FUGAFUGA, json={"value1": "Hello, IFTTT!"}) |
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
$(function() { | |
setInterval(function() { | |
var d = new Date(); | |
var formatDate = | |
d.getFullYear() + '年' + | |
(d.getMonth() + 1) + '月' + | |
d.getDate() + '日 ' + | |
d.getHours() + '時' + | |
d.getMinutes() + '分'; | |
$("#time").text(formatDate); |
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
" 色づけを on にする | |
set t_Co=256 | |
syntax on | |
" ハイライトサーチを有効にする | |
set hlsearch | |
" 大文字小文字を区別しない(検索時) | |
set ignorecase | |
" ただし大文字を含んでいた場合は大文字小文字を区別する(検索時) | |
set smartcase |
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
indent_align_string=true | |
indent_braces=false | |
indent_braces_no_func=false | |
indent_brace_parent=false | |
indent_namespace=false | |
indent_extern=false | |
indent_class=true | |
indent_class_colon=true | |
indent_else_if=false | |
indent_func_call_param=false |
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
# -*- coding: utf-8 -*- | |
import sys | |
def fib(n): | |
if n <= 2: | |
return 1 | |
else: | |
return fib(n-1) + fib(n-2) | |
if __name__ == "__main__": |
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
/* 前略、道の上より */ | |
func main() { | |
anaconda.SetConsumerKey(config.ConsumerKey) | |
anaconda.SetConsumerSecret(config.ConsumerSecret) | |
api := anaconda.NewTwitterApi(config.AccessToken, config.AccessTokenSecret) | |
v := url.Values{} | |
v.Set("follow", "ID1, ID2, ...") //set user IDs(NOT screen names) | |
stream := api.PublicStreamFilter(v) | |
for { | |
select { |
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
# Source Prezto. | |
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then | |
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" | |
fi | |
# zsh起動時にtmux起動 | |
[[ -z "$TMUX" && ! -z "$PS1" ]] && exec tmux | |
# ranger | |
alias ranger='TERM=xterm-256color ranger' # To use solarized theme :( |
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
# | |
# Sets Prezto options. | |
# | |
# Authors: | |
# Sorin Ionescu <sorin.ionescu@gmail.com> | |
# | |
# | |
# General | |
# |
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
set-window-option -g mode-keys vi | |
#y and p as in vim | |
bind p paste-buffer | |
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection | |
bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle | |
bind-key -T copy-mode-vi 'Space' send-keys -X halfpage-down | |
bind-key -T copy-mode-vi 'Bspace' send-keys -X halfpage-up | |
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i' |
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
// bodyの確認 | |
body, err := ioutil.ReadAll(resp.Body) | |
if err != nil { | |
log.Fatalln(err) | |
} | |
fmt.Printf("body: " + string(body) + "\n") |
OlderNewer