Skip to content

Instantly share code, notes, and snippets.

View ymotongpoo's full-sized avatar
📈
observability matters

Yoshi Yamaguchi ymotongpoo

📈
observability matters
View GitHub Profile
# -*- coding: utf-8 -*-
# expressing my strong respect for mopemope
import re
import urllib
from urlparse import urlunparse, urlparse
import gzip
import eventlet
from eventlet.green import urllib2
import cookielib
@ymotongpoo
ymotongpoo / requests-oauth2.py
Created February 25, 2012 07:53
Google API OAuth 2.0 Authorization Sample in Python
# -*- coding: utf-8 -*-
"""
This scripts reqire a third party module 'requests'.
You can get it from PyPI, i.e. you can install it using
easy_install or pip.
http://docs.python-requests.org/en/v0.10.4/
Original source code is written by shin1ogawa, which is in Java.
@ymotongpoo
ymotongpoo / gist:1381882
Created November 21, 2011 06:57
convert PuTTy public key.
# convert PuTTY's public ssh key file into OpenSSH public key
ssh-keygen -i -f id_rsa_putty.pub > id_rsa.pub
@ymotongpoo
ymotongpoo / gist:1342656
Last active November 22, 2022 01:26
extract AAC audio from flv, and convert aac to mp3 using ffmpeg
# using libfaac on Mac OS X 10.6.8
# -vn : not copying video
# -acodec : specify codec used in flv file
# -ac : channels. 1 is for mono, 2 is for stereo
# -ab : specify bitrate for output file (note that rate is not kbps but bps)
# -ar : sampling frequency (Hz)
# -threads: number of threads for encoding
# "-strict experimental" is necessary to use libfaac
ffmpeg -y -i xxxxxxxxxxx.flv -vn -acodec aac -ac 2 -ab 128000 -ar 44100 -threads 4 -strict experimental xxxxx.m4a
Delivered-To: xxxxxx@xxxxxxxxxxxx
Received: by 10.223.134.87 with SMTP id 23csp1244134wrw;
Sun, 21 May 2017 21:43:04 -0700 (PDT)
X-Received: by 10.99.174.75 with SMTP id e11mr23610228pgp.177.1495428184223;
Sun, 21 May 2017 21:43:04 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1495428184; cv=none;
d=google.com; s=arc-20160816;
b=DBktClU64S87Z77Ap0yjGqBeK9t/pDwu0gXS6yzjFqc004j3bGXPHG6e95rfTbvzC3
atioTJML5mxGCj5Pan8Z0Hz8JQMun6zM0N3HwRgRNvgOkpaeZy+K1hIKid5rHC2mWPd3
pWHZQjujAVbYlVfU95emrqkfJ0sKBFxbn8nobG7uVeFbkt+/vgfZNmlTMfgkmmVPJ8F/
Delivered-To: xxxxxx@xxxxxxxxxxxxxxx
Received: by 10.12.175.200 with SMTP id t8csp635651qvc;
Wed, 30 Nov 2016 18:06:16 -0800 (PST)
X-Received: by 10.200.39.51 with SMTP id g48mr32005119qtg.256.1480557976704;
Wed, 30 Nov 2016 18:06:16 -0800 (PST)
Return-Path: <yusuke.kakinuma@randstad.co.jp>
Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com. [2607:f8b0:400d:c0d::22c])
by mx.google.com with ESMTPS id c190si33087432qkf.186.2016.11.30.18.06.16
for <xxxxxx@xxxxxxxxxxxxxxx>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Delivered-To: xxxxxx@xxxxxxxxxxxx
Received: by 10.157.34.135 with SMTP id y7csp212480ota;
Mon, 11 Jul 2016 22:43:33 -0700 (PDT)
X-Received: by 10.98.6.132 with SMTP id 126mr41369222pfg.109.1468302213630;
Mon, 11 Jul 2016 22:43:33 -0700 (PDT)
Return-Path: <h-konno@rgf-hragent.jp>
Received: from APC01-PU1-obe.outbound.protection.outlook.com (mail-pu1apc01on0086.outbound.protection.outlook.com. [104.47.126.86])
by mx.google.com with ESMTPS id b11si4855913pfk.45.2016.07.11.22.43.32
for <xxxxxx@xxxxxxxxxxxx>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
@ymotongpoo
ymotongpoo / テクノブレーン碣石2.txt
Created July 31, 2018 14:39
2016-03-31 - 2016-04-11
Delivered-To: xxxxxxx@xxxxxxxxxxxxx
Received: by 10.107.142.216 with SMTP id q207csp1542809iod;
Sun, 10 Apr 2016 23:55:38 -0700 (PDT)
X-Received: by 10.66.184.40 with SMTP id er8mr23121433pac.134.1460357738338;
Sun, 10 Apr 2016 23:55:38 -0700 (PDT)
Return-Path: <its2@techno-brain.co.jp>
Received: from smtp.kagoya.net (smtp2.kagoya.net. [153.127.234.4])
by mx.google.com with ESMTP id 69si1719665pfk.13.2016.04.10.23.55.38
for <xxxxxxx@xxxxxxxxxxxxx>;
Sun, 10 Apr 2016 23:55:38 -0700 (PDT)
elivered-To: xxxxxx@xxxxxxxxxxxxxx
Received: by 10.220.148.130 with SMTP id p2csp148681vcv;
Mon, 8 Sep 2014 04:21:54 -0700 (PDT)
X-Received: by 10.66.65.195 with SMTP id z3mr33385922pas.116.1410175304905;
Mon, 08 Sep 2014 04:21:44 -0700 (PDT)
Return-Path: <aoyama@icpa.com>
Received: from mail05.whp-gol.com (mail05.whp-gol.com. [202.191.119.109])
by mx.google.com with SMTP id db4si17037181pdb.240.2014.09.08.04.21.14
for <xxxxxx@xxxxxxxxxxxxxx>;
Mon, 08 Sep 2014 04:21:44 -0700 (PDT)
Delivered-To: xxxxxx@xxxxxxxxxxxxxx
Received: by 10.58.169.12 with SMTP id aa12csp195489vec;
Wed, 21 Aug 2013 03:34:18 -0700 (PDT)
X-Received: by 10.68.139.201 with SMTP id ra9mr7021235pbb.46.1377081256695;
Wed, 21 Aug 2013 03:34:16 -0700 (PDT)
Return-Path: <e-itosu@technobr.jp>
Received: from 000.bz (ip01.mac.dcn.ne.jp. [219.105.40.82])
by mx.google.com with SMTP id gx9si6023449pac.127.1969.12.31.16.00.00;
Wed, 21 Aug 2013 03:34:16 -0700 (PDT)
Received-SPF: neutral (google.com: 219.105.40.82 is neither permitted nor denied by best guess record for domain of e-itosu@technobr.jp) client-ip=219.105.40.82;