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
# -*- 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
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
// bodyの確認 | |
body, err := ioutil.ReadAll(resp.Body) | |
if err != nil { | |
log.Fatalln(err) | |
} | |
fmt.Printf("body: " + string(body) + "\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
mkdir -p ~/.local/share/fonts | |
for type in Bold Light Medium Regular Retina; do | |
wget -O ~/.local/share/fonts/FiraCode-${type}.ttf \ | |
"https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-${type}.ttf?raw=true"; | |
done | |
fc-cache -f |
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
FROM node:latest | |
# prepare a user which runs everything locally! - required in child images! | |
RUN useradd --user-group --create-home --shell /bin/false app | |
ENV HOME=/home/app | |
WORKDIR $HOME | |
RUN npm install -g yarn@1.0.2 && yarn global add @angular/cli@latest && yarn cache clean |
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 splat(fn) { | |
return array => { | |
return fn.apply(null, array); | |
}; | |
} | |
const addArrayElements = splat((x, y) => x + y); | |
// returns 3 | |
addArrayElements([1, 2]); |
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
if [[ -z "$LANG" ]]; then | |
export LANG='en_US.UTF-8' | |
fi | |
# | |
# Paths | |
# | |
# Ensure path arrays do not contain duplicates. | |
typeset -gU cdpath fpath mailpath path |
OlderNewer