Skip to content

Instantly share code, notes, and snippets.

View tdtds's full-sized avatar
🐱
🐱

Tada, Tadashi tdtds

🐱
🐱
View GitHub Profile
package configuration for libffi is not found
have_header: checking for ffi.h... -------------------- no
"gcc -E -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/fiddle -I/home/sho/.rbenv/versions/2.2.0/include -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -o conftest.i"
conftest.c:3:17: fatal error: ffi.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
@tdtds
tdtds / picasa_oauth.md
Last active August 29, 2015 14:22
PicasaWeb APIのOAuthがうまく使えないメモ

要件

  • 従来パスワード認証で使っていたpicasa gemを使いたい(OAuth対応してると書いてある)
  • アルバム作成、指定アルバムへの画像追加がしたい

やったこと

  • Google Developers Consoleでプロジェクトをひとつ作成
  • そのプロジェクトの「認証情報」でサービスアカウントを追加、ここでメールアドレス「[email protected]」を得る
  • P12キーを生成してダウンロード(test.p12)
  • picasa gemに加えてgoogle-api-client gemをインストール
  • (以下はgoogle-api-clientとpicasaをrequireしたpry上で作業)
#!/usr/bin/env ruby
#
# Convert tDiary's documents from HikiDoc to Markdown
#
# Copyright (C) Tada, Tadashi <[email protected]>
#
require 'open-uri'
require 'nokogiri'
require 'cgi'