Skip to content

Instantly share code, notes, and snippets.

tadaken3 tadaken3

Block or report user

Report or block tadaken3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tadaken3
tadaken3 / fetchLatestBlog.js
Last active Oct 30, 2018
いくつかのブログのFeedから、最新の情報を取得したい
View fetchLatestBlog.js
/*
やりたいこと:
いくつかのブログのFeedから、最新の情報を取得し、JSON形式で返したい
node -v9.5.0
*/
/*求めている結果
[
[{
@tadaken3
tadaken3 / hotena_blog_post_for_cotEditer.py
Last active Jun 30, 2018
hotena_blog_post_for_cotEditer.py
View hotena_blog_post_for_cotEditer.py
#!/usr/local/bin/python
#coding=utf-8
"""post hatena-blog script for CotEditor
Post text of the current document on CotEditor to Habeta-blog.
This is a CotEditor script.
"""
__version__ = '1.0.0'
__date__ = '2017-08-24'
@tadaken3
tadaken3 / main.gs
Created Jun 29, 2018
slackbot_codic
View main.gs
/* webhook でメッセージを拾う */
function doPost(e) {
/* パラメーターを取得し、トークンが不一致なら処理終了 */
var token = e.parameter.token;
var properties = PropertiesService.getScriptProperties();
if (token != properties.getProperty('SLACK_REPLY_TOKEN')) {
return;
}
var text = e.parameter.text;
View freee-get-deals.gs
var appId = "Your ID";
var secret = "Your Secret";
function alertAuth() {
var service = getService();
var authorizationUrl = service.getAuthorizationUrl();
var template = HtmlService.createTemplate(
'<a href="<?= authorizationUrl ?>" target="_blank">認証</a>. ' +
'認証が完了したら再度操作を行ってください。');
template.authorizationUrl = authorizationUrl;
@tadaken3
tadaken3 / main.gs
Created May 9, 2017
GASでTrelloのボードIDを取得する
View main.gs
function getBoard() {
var trelloKey = "XXXXXX";//keyを入力してください
var trelloToken = "XXXXXX";//tokenを入力してください
var userName = "kaban-chan";//user nameを入力してください
var url = 'https://trello.com/1/members/' + userName + '/boards?key=' + trelloKey + '&token=' + trelloToken + '&fields=name';
res = UrlFetchApp.fetch(url, {'method':'get'});
Logger.log(res);
}
@tadaken3
tadaken3 / trello.js
Created May 5, 2017
Google App ScriptでTrelloのカード一覧を取得して、チャットワークに通知する
View trello.js
trello.js
function main() {
//Trello
var key = "trello_key";
var token = "trello_token";
var board = "57b40268d9638e728e6d03e1"; //エディトリアルカレンダー
var list = "57b403848c38f7edb2cf8e4f"; //完了済み
var cardsUrl = "https://trello.com/1/lists/" + list + "/cards?key=" + key + "&token=" + token;
var membersUrl = "https://trello.com/1/boards/" + board + "/members?key=" + key + "&token=" + token;
@tadaken3
tadaken3 / file0.txt
Last active Apr 18, 2017
Google Apps ScriptからMastodonにトゥートしてみた ref: http://qiita.com/tadaken3/items/1c86dde501bb466f2d1d
View file0.txt
//mastodonに投稿する
function postUpdateToots(message,token,url){
var url = url
var options =
{
"method" : "post",
"payload" : "status=" + message,
"headers" : {"Authorization" : "Bearer "+ token}
};
@tadaken3
tadaken3 / line_nofity.py
Last active May 18, 2017
PythonからLINE NotifyでLINEにメッセージを送る ref: http://qiita.com/tadaken3/items/0998c18df11d4a1c7427
View line_nofity.py
#coding:UTF-8
import requests
def main():
url = "https://notify-api.line.me/api/notify"
token = #ここにアクセストークンを入力します。
headers = {"Authorization" : "Bearer "+ token}
message = 'ここにメッセージを入れます'
payload = {"message" : message}
View file0.txt
#codeing:UTF-8
import sqlite3
import pandas as pd
#ない場合は新たに作成される
con = sqlite3.connect('/Users/Desktop/web_data.db')
drop_table = "drop table gas_portal_access_log"
@tadaken3
tadaken3 / file0.txt
Last active Jul 17, 2019
wikipediaからのページからリンク一覧を取得する方法 ref: https://qiita.com/tadaken3/items/e09ba2ede988bbacb303
View file0.txt
#codeing:utf-8
import re
from bs4 import BeautifulSoup
from urllib.request import urlopen
from urllib.parse import unquote
url = "https://ja.wikipedia.org/wiki/%E3%83%86%E3%82%A4%E3%83%AB%E3%82%BA_%E3%82%AA%E3%83%96_%E3%82%A4%E3%83%8E%E3%82%BB%E3%83%B3%E3%82%B9"
html = urlopen(url)
You can’t perform that action at this time.