Skip to content

Instantly share code, notes, and snippets.

View docker-compose.yml
version: '3'
services:
wordpress:
image: wordpress:latest
depends_on:
- db
ports:
- "8000:80"
restart: always
View 日次RSSフィード開発日誌のDEMO_output済.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tututen
tututen / ClosedRange.java
Last active Aug 1, 2017
TDDワークショップ 小室・横山チーム 2017/08/01
View ClosedRange.java
package jp.classmethod.tddbc;
public class ClosedRange {
private int lowerEndpoint;
private int upperEndpoint;
public int getLowerEndpoint() {
return this.lowerEndpoint;
}
@tututen
tututen / zundoko.py
Created Aug 7, 2016
zundoko KIYOSHI PYTHON #codejp
View zundoko.py
#!/usr/bin/env python
import random as r
s=' '*16
while True:
p=r.choice(['zun','doko'])
print(p)
s+=p
if s[-16:]=='zun'*4+'doko':
print 'KIYOSHI!'
break
@tututen
tututen / index.html
Created Aug 12, 2014
#codejp 2014 出題時のソース
View index.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body style="font-family:monospace;">
<script type="text/javascript" src="main.js"></script>
</body>
</html>
View CodeJP2014golf.md
@tututen
tututen / gist:c8a56c37ea7112a3351f
Created Jul 15, 2014
C#で指定した送信元IPを使って通信行う場合
View gist:c8a56c37ea7112a3351f
var socket = new System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork,
System.Net.Sockets.SocketType.Dgram,
System.Net.Sockets.ProtocolType.Udp);
socket.Bind(new System.Net.Sockets.IPEndPoint(System.Net.IPAddress.Parse("192.168.0.4"), 0));
@tututen
tututen / sh
Created Jan 27, 2014
Python の shallow copyとdeep copyについて
View sh
In [1]: a=[[0]*5]*4
In [2]: a
Out[2]: [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
In [3]: a[0][0]=1
In [4]: a
Out[4]: [[1, 0, 0, 0, 0], [1, 0, 0, 0, 0], [1, 0, 0, 0, 0], [1, 0, 0, 0, 0]]