Skip to content

Instantly share code, notes, and snippets.

tomoki megatk

Block or report user

Report or block megatk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
megatk /
Last active Jul 9, 2018
Python3 で、MySQL にアクセスする
#! /usr/bin/python3
# -*- coding: utf-8 -*-
from mySQLUtil import MySQLUtil
dbx = MySQLUtil(
megatk /
Created May 21, 2016
Python FTP接続でログファイルを監視する
# -*- coding:utf-8 -*-
import os
# 文字コード自動判別
def analyzeEncode(file, content=''):
lookup = ('shift_jis','euc-jp','utf-8','iso-2022-jp','ascii')
encode = []
if os.path.exists(file):
megatk / myLogger.php
Created Oct 3, 2015
PHP monologをカスタマイズ
View myLogger.php
// ★ composerでmonologをインストールしている前提
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Processor\WebProcessor;
use Monolog\Formatter\LineFormatter;
class myLogger
View Wunderlist.php
class WunderList
protected $client_id;
protected $client_secret;
protected $redirect_url;
protected $state;
protected $access_token;
protected $header = array();
megatk / groupbyApacheLog
Last active Aug 29, 2015
Apache のログをグルーピングして出力するスクリプト
View groupbyApacheLog
# 名称
# groupbyApacheLog - Apacheログを指定項目でグルーピング
# 書式
# groupbyApacheLog [-s] [-tz] target LogFile
# -s
# 静的ファイル(.js .css .html .jpg .gif .png)含める
You can’t perform that action at this time.