Skip to content

Instantly share code, notes, and snippets.

View katz's full-sized avatar

Katsuyuki Sakai katz

View GitHub Profile
@katz
katz / ScrapingByScrapySharp.cs
Last active August 22, 2016 00:58
C#のScrapySharpでスクレイピングする / Web scraping by ScrapySharp
using System;
using HtmlAgilityPack;
using ScrapySharp.Extensions;
using ScrapySharp.Network;
using System.Linq;
using System.Text.RegularExpressions;
namespace ScrapySharpTest
{
class Program
@katz
katz / file0.cs
Last active June 30, 2016 07:16
Facebook SDK for .NETで、アプリのアクセストークンを取得する方法 ref: http://qiita.com/katz/items/6d23310be60f8e35a97d
// まずはアプリアクセストークンを取得する
var fb = new FacebookClient();
dynamic result = fb.Get("oauth/access_token", new
{
client_id = appId, //FacebookアプリのID
client_secret = appSecret, //FacebookアプリのSecret
grant_type = "client_credentials"
});
@katz
katz / RecalculateSellectedCells.gs
Last active April 15, 2021 14:58
Google Apps Script to re-calculate selected cells in Sheets
/**
* @OnlyCurrentDoc Limits the script to only accessing the current spreadsheet.
*/
/**
* Adds a custom menu with items to show the sidebar and dialog.
*
* @param {Object} e The event parameter for a simple onOpen trigger.
*/
@katz
katz / get_posts.py
Last active August 29, 2015 14:10 — forked from my-slab/get_posts.py
import facebook
import requests
def some_action(post):
""" Here you might want to do something with each post. E.g. grab the
post's message (post['message']) or the post's picture (post['picture']).
In this implementation we just print the post's created time.
"""
print post['created_time']