Skip to content

Instantly share code, notes, and snippets.

View toenobu's full-sized avatar
🏠
Working from home

toenobu

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python
print 'hello japan'
print 'taiawn'
print 'china'
@toenobu
toenobu / vert.py
Last active December 15, 2015 00:49 — forked from yatt/vert.py
#! /usr/bin/python2.7
# coding: utf-8
target = u"""サンプルの文字列です。
Pythonで文字列を縦書きに
変換します。"""
lst = target.split()[::-1]
# mapで転置して結合
@toenobu
toenobu / nginxspdy
Last active December 15, 2015 18:19
nginxと共用
#!/bin/sh
#
# nginx Startup script for nginx
#
# chkconfig: - 85 15
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
# pidfile: /var/run/nginx.pid
# description: nginx is a HTTP and reverse proxy server
@toenobu
toenobu / nginx.conf
Last active December 15, 2015 18:19
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid /var/run/nginxspdy.pid;
@toenobu
toenobu / thyme_leaf_nested_list
Last active April 9, 2023 15:23
nested list in tr element
// http://forum.thymeleaf.org/Nested-for-loop-or-alternatives-td4026245.html
// about Map<String, List<String>>
<div th:each="${entry : ${yourMap}}">
< span th:text="${entry.key}">A< /span>
<div th:each="${element : ${entry.value}}">
...
</div>
</div>
#user nobody;
worker_processes 5;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
pid /var/run/{{ version }}.pid;
@toenobu
toenobu / s3.py
Created September 23, 2013 14:46
amazon s3から取得。 requestsに依存している。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime
import sha, hmac, base64
import requests
class Picture(object):
def __init__(self, access, secret, bucket, path, gmt=None):
self.access = access
@toenobu
toenobu / bedbebbed.md
Last active January 3, 2016 19:08
京都のバンド bedを見に行くために、いくらかかるかを算出.

福岡から京都へ行くためには、いくらかかるか計算します。 安く抑えたいので何かアドバイスがあったら、@toenobuまでメンションください

live information about bet in kyoto

@toenobu
toenobu / _ttngttngttng_.md
Created May 6, 2014 13:17
ukのバンド ttngを見に行くために、いくらかかるかを算出.
@toenobu
toenobu / ws.yaml
Created August 26, 2014 05:05
tmuxp_my_enviroment
session_name: 2-pane-vertical
windows:
- window_name: postgres
panes:
- null
- window_name: text_edit
panes:
- null
- null
- window_name: text_edit_2