View php-fpm.conf
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
;;;;;;;;;;;;;;;;;;;;; | |
; FPM Configuration ; | |
;;;;;;;;;;;;;;;;;;;;; | |
[global] | |
; Pid file | |
; Note: the default prefix is /home/yasui/.phpenv/versions/5.3.28/var | |
; Default Value: none | |
pid = run/php-fpm.pid | |
; Error log file |
View awsinstall.sh
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
#!/bin/sh | |
set -x | |
# set some variables, so they're easy to adjust | |
TMPDIR=/var/tmp | |
BOOTSTRAP=/usr/local/hp-bootstrap | |
# these versions are current as of oct 3, 2014. if a lot of time has | |
# passed between then and the time you build this, you might want to | |
# verify they haven't been superseded by newer versions. |
View php-fpm.sh
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
#! /bin/sh | |
# | |
# chkconfig: - 84 16 | |
# description: PHP FastCGI Process Manager | |
# processname: php-fpm | |
# config: /home/user/.phpenv/versions/5.4.37/etc/php-fpm.conf | |
# pidfile: /var/run/php-fpm.pid | |
# this source is https://forums.aws.amazon.com/message.jspa?messageID=283298 | |
# |
View gist:458c1773087bf31901df
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
# `test.txt` という名前の mail から plain text を取り出して吐き出す | |
msg = email.message_from_string(open('test.txt').read()) | |
for part in msg.walk(): | |
if part.get_content_type() == 'text/plain': | |
open('test.plan.txt', 'w').write( part.get_payload(decode=1).encode('iso-2022-jp').decode('utf8') ) |
View index_test1.html
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<link href="style.css" rel="stylesheet" type="text/css"> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
</head> | |
<body> |
View cal.py
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
#!/usr/bin/env python | |
def is_uru (year): | |
if year % 4 == 0: | |
if year % 400 == 0: | |
return True | |
elif year % 100 == 0: | |
return False | |
return True | |
return False |
View wareki.py
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
#!/usr/bin/env python | |
# -*- coding: utf_8 -*- | |
def yearToWareki (year): | |
r""" | |
result: tuple [('元号', 年, 日数), ('元号', 年, 日数)] | |
2つ目の要素はほぼないが、変わり目の時にある | |
""" | |
# 明治元年: 1868 | |
# 明治45年: 1912 (~7/29) |
View for.c
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
/* gcc -std=c99 -o for for.c | |
* | |
* -std=c99 で c99 文法としてコンパイル | |
* ex: http://seclan.dll.jp/c99d/ | |
*/ | |
#include <stdio.h> | |
int | |
main (void) | |
{ |
View MAMPcwd
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
#!/bin/sh | |
# -*- coding: utf_8 -*- | |
# | |
# MAMPcwd (start|stop|cwd) | |
# MAMP のコマンドライン補佐ツール | |
# | |
# start: 再起動/起動をします | |
# stop : 停止します | |
# cwd : コマンドを実行したディレクトリをDocumentRootにして、再起動をします | |
# |
View gist:4585010
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
1> lists:sum([X || X <- lists:seq(1, 999), X rem 3 == 0 orelse X rem 5 == 0]). | |
233168 |
OlderNewer