TwitterのタイムラインはJSONで流れてくるので、JSONぽい形式でデータを突っ込むMongoDBと相性が良い。
今まではtimeline.logとして書き出してたけど、GB単位に膨らんだテキストファイル重すぎて扱いづらいし最近は専らMongoDBに流し込んでます。
全部保存しとくと、誰がいつどのtweetを消したとか分かって異常に便利。こわい。
全文検索したいときがあるので、ツイイトはわかち書きでsplitして配列としても入れといてます。
MongoDBは配列で保存出来て、配列内にインデックスを貼れるので、簡単にいい感じの検索機能が作れて楽しいですね。
TLの全保存やってる人自体はそこら中に居るだろうし目新しいことは特にないでした。
YARD CHEATSHEET http://yardoc.org
May 2020 - updated fork: https://gist.github.com/phansch/db18a595d2f5f1ef16646af72fe1fb0e
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Data; | |
using System.Linq; | |
using System.Text; | |
namespace Ledsun | |
{ | |
public static class DataTableExtentions | |
{ | |
#region 抽出結果データテーブルをCSVテキストに変換する。 | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
module TelSplitter | |
MAP = { | |
# 市外局番 , 市内局番の桁数のマップ | |
# http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/number_shitei.html のデータを利用 | |
# 固定電話以外の桁数は適当です... | |
'050' => 4, # IP電話 | |
'070' => 4, # 携帯電話/PHS | |
'080' => 4, # 携帯電話 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RSpec | |
module Core | |
class Example | |
def run_with_retry(example_group_instance, reporter) | |
@retrying_count = 0 | |
succeeded = run_without_retry(example_group_instance, reporter) | |
unless succeeded | |
return finish_without_retry(reporter) unless retry_needed? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## install fontforge | |
brew install fontforge | |
##mkdir work | |
mkdir ~/.Trash/ricty | |
cd ~/.Trash/ricty | |
## get fontfiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# moved to https://github.com/masutaka/dotfiles-public/blob/master/bin/my-brew-bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
require 'optparse' | |
# | |
# なるべく短い正規表現で住所を「都道府県/市区町村/それ以降」に分けるエクストリームスポーツ | |
# http://qiita.com/zakuroishikuro/items/066421bce820e3c73ce9 | |
# | |
# 正規表現で住所の「都道府県/市区町村/それ以降」をキャプチャできるか試すスクリプト | |
# 使い方はとりあえず実行すれば分かると思います | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
# | |
# required env: | |
# WAFFLE_ACCESS_TOKEN | |
# WAFFLE_ORG_NAME | |
# WAFFLE_PROJECT_NAME | |
# | |
# required packages: | |
# base64 | |
# curl |
OlderNewer