Skip to content

Instantly share code, notes, and snippets.

@soy-curd
soy-curd / endian.h
Created December 10, 2015 23:26 — forked from yinyin/endian.h
BSD/Linux-like <endian.h> for MacOS X
#ifndef __FINK_ENDIANDEV_PKG_ENDIAN_H__
#define __FINK_ENDIANDEV_PKG_ENDIAN_H__ 1
/** compatibility header for endian.h
* This is a simple compatibility shim to convert
* BSD/Linux endian macros to the Mac OS X equivalents.
* It is public domain.
* */
#ifndef __APPLE__
@soy-curd
soy-curd / hatenaoauth_example_py3.py
Last active April 6, 2020 02:53 — forked from laiso/hatenaoauth_example.py
Pythonではてなの OAuth 対応 API を利用する(python3版)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
フレームワークとして Flask(http://flask.pocoo.org/) を、OAuth ライブラリとして oauth2(http://pypi.python.org/pypi/oauth2/) を利用したサンプルプログラムです。
下のコードを保存して (oauth_consumer.py とします)、YOUR_CONSUMER_KEY, YOUR_CONSUMER_SECRET となっている部分を自分の consumer_key, consumer_secret で置き換えます。(settings.pyに保存してください)
$ python oauth_consumer.py
... で起動してから http://localhost:5000 に Web ブラウザでアクセスして下さい。
+ 2015/10/25 python3用に書き換えました。
"""