Skip to content

Instantly share code, notes, and snippets.

View howyi's full-sized avatar
🐔

niwatori / Hayashi Takuya howyi

🐔
View GitHub Profile
@howyi
howyi / suumo.js
Created August 16, 2019 04:17
特定ユーザのツイートをslackに投稿する
/* Amplify Params - DO NOT EDIT
You can access the following resource attributes as environment variables from your Lambda function
var environment = process.env.ENV
var region = process.env.REGION
Amplify Params - DO NOT EDIT */
const AWS = require('aws-sdk');
const S3 = new AWS.S3();
{
"data": {
"0": {
"values": {
"sushi": 99,
"tempura": 8,
"inu": 11
}
}
}
{
"data": {
"0": {
"values": "Array of length 3"
}
}
}
@howyi
howyi / UserStreamToSlack.py
Last active January 29, 2016 15:34
UserStreamToSlack.py
#!/usr/bin/env python2.7
#-*- coding:utf-8 -*-
import tweepy
from tweepy.streaming import StreamListener
from tweepy import Stream
import sys
import urllib2
@howyi
howyi / GetImageUrl.py
Last active September 10, 2015 18:01
Image
# coding: utf-8
# Python 3.4.3
# tweepy 3.3.0
#中略
api = tweepy.API(auth_handler=auth)
s = api.get_status(607174780312158208)
@howyi
howyi / GetStatus.py
Created September 7, 2015 11:47
Get status from TweetID
#codinf: utf-8
# python 3.4.3
# tweepy 3.3.0
import sys
import tweepy
import shelve
dic = shelve.open('account')
@howyi
howyi / Authorize.py
Created September 7, 2015 11:25
Authorize and save access token
# coding: utf-8
# python 3.4.3
# tweepy 3.3.0
import webbrowser
import tweepy
import shelve
consumer_key = 'hogehogehoge'
@howyi
howyi / initialize.php
Created July 16, 2015 05:23
Initialize
<?PHP
#初期設定を共通化して手間を省く(hogeとfoo,barは差し替え必須)
define('CONSUMER_KEY', 'hogehogehoge');
define('CONSUMER_SECRET','foofoofoo');
define('OAUTH_CALLBACK', 'http://localhost/barbarbarbar/callback.php');
?>
@howyi
howyi / tweet.php
Created July 16, 2015 05:23
Tweet
<html>
<head>
<title>Tweet</title>
</head>
<body>
<pre>
<?php
session_start();
require "twitteroauth/autoload.php";
@howyi
howyi / callback.php
Last active August 29, 2015 14:25
Save access_token
<html>
<head>
<title>Callback</title>
</head>
<body>
<?php
session_start();
require "twitteroauth/autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;