Skip to content

Instantly share code, notes, and snippets.

View s-wool's full-sized avatar

Norikazu Kato s-wool

View GitHub Profile
@s-wool
s-wool / upload_gmusic.py
Last active December 29, 2015 06:19
gmusicapiのOauth認証
>>> from gmusicapi import Musicmanager
>>> mm = Musicmanager()
>>> mm.perform_oauth()
No handlers could be found for logger "oauth2client.util"
Visit the following url:
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmusicmanager&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&client_id=652850857958.apps.googleusercontent.com&access_type=offline
#URLコピペしてブラウザから認証するとコードが表示されるので、↓にコピペします
Follow the prompts, then paste the auth code here and hit enter: your_auth_code
<oauth2client.client.OAuth2Credentials object at 0xf4e6d0>
@s-wool
s-wool / gist:7516488
Created November 17, 2013 18:32
apt-cygの64bit対応とxzファイルの対応
--- apt-cyg.orig 2010-04-28 03:55:43.000000000 +0900
+++ apt-cyg 2013-11-18 03:31:25.034070400 +0900
@@ -95,14 +95,14 @@ function getsetup()
then
touch setup.ini
mv setup.ini setup.ini-save
- wget -N $mirror/setup.bz2
+ wget -N $mirror/x86_64/setup.bz2
if test -e setup.bz2 && test $? -eq 0
then
@s-wool
s-wool / gist:7267210
Last active December 27, 2015 04:29
hueのsqlite→mysqlのmigrationがこけるので 要--ignore-whitespace
diff -u a/apps/jobsub/src/jobsub/migrations/0002_auto__add_ooziestreamingaction__add_oozieaction__add_oozieworkflow__ad.py b/apps/jobsub/src/jobsub/migrations/0002_auto__add_ooziestreamingaction__add_oozieaction__add_oozieworkflow__ad.py
--- a/apps/jobsub/src/jobsub/migrations/0002_auto__add_ooziestreamingaction__add_oozieaction__add_oozieworkflow__ad.py 2013-07-13 07:49:44.000000000 +0900
+++ b/apps/jobsub/src/jobsub/migrations/0002_auto__add_ooziestreamingaction__add_oozieaction__add_oozieworkflow__ad.py 2013-11-01 18:30:10.115837288 +0900
@@ -46,7 +46,7 @@
('files', self.gf('django.db.models.fields.CharField')(default='[]', max_length=512)),
('mapper', self.gf('django.db.models.fields.CharField')(max_length=512)),
('reducer', self.gf('django.db.models.fields.CharField')(max_length=512)),
- ('job_properties', self.gf('django.db.models.fields.TextField')(default='[]')),
+ ('job_properties', self.gf('django.db.models.fields.CharField')(default='[]',
@s-wool
s-wool / gist:7085167
Created October 21, 2013 14:50
hueのsqlite→mysqlでハマる。
> beeswax:0002_auto__add_field_queryhistory_notify
> beeswax:0003_auto__add_field_queryhistory_server_name__add_field_queryhistory_serve
> beeswax:0004_auto__add_session__add_field_queryhistory_server_type__add_field_query
> beeswax:0005_auto__add_field_queryhistory_statement_number
> beeswax:0006_auto__add_field_session_application
> beeswax:0007_auto__add_field_savedquery_is_trashed
> beeswax:0008_auto__add_field_queryhistory_query_type
- Loading initial data for beeswax.
No fixtures found.
Running migrations for hbase: