Skip to content

Instantly share code, notes, and snippets.

View alea12's full-sized avatar
🏠

alea12 alea12

🏠
View GitHub Profile
require 'twitter'
require 'active_record'
ActiveRecord::Base.establish_connection(
adapter: 'mysql2',
host: 'localhost',
username: 'root',
database: 'twitter',
# For emoji
charset: 'utf8mb4',
@alea12
alea12 / deleted_tweets.rb
Created December 27, 2015 08:55
deleted_tweets.rb
require 'twitter'
require 'big_query'
# Twitter Gem のバグを回避
class HTTP::URI
def port
443 if self.https?
end
end
@alea12
alea12 / test.rb
Created December 27, 2015 07:10
test.rb
require 'big_query'
require 'twitter'
require 'pp'
class HTTP::URI
def port
443 if self.https?
end
end
@alea12
alea12 / twitter_to_bq.rb
Last active December 27, 2015 05:19
twitter_to_bq.rb
require 'google/api_client'
require 'twitter'
require 'pp'
class BigQuery
APP_NAME = 'https://twitter.com/9m'
TABLE_ID = 'timeline'
SCHEMA_FIELDS = [
{
name: 'status_id',
@alea12
alea12 / stream.rb
Last active December 27, 2015 04:07
stream.rb
require 'twitter'
class HTTP::URI
def port
443 if self.https?
end
end
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
@alea12
alea12 / comparison.md
Last active December 11, 2015 05:36
Comparison between Surface Pro 3, VAIO S11 and MacBook Air 11"
Name Surface Pro 3 VAIO S11 MacBook Air 11" Early 2015
Comment 今のメイン。 ほしい。買うなら以下の構成。 比較対象。買うなら以下の構成。
Display 12" wide Touch-Panel 11.6" wide Anti-Glare 11.6" wide Glare
Resolution [px] 2160 x 1440 1920 x 1080 1366 x 768
Size [mm] 295 x 217 x 13.9(*) 284 x 190 x 19.1 300 x 192 x 17
Weight [g] 1095(*) 940 1080
Battery Life [h] 9 14 9
CPU Core i3 4020Y (1.5GHz) Core i5 6200U (2.3~2.8GHz) Core i5 4260U (1.6~2.7GHz)
MMR 4GB 8GB 8GB

Surface Pro 3 の調子が悪くなったので出荷状態に戻していろいろやった。

バックアップから再インストールまで

  • バックアップしたのは将棋関連、ウイイレのセーブデータ、VirtualBox の VM
    • VirtualBox の VM は仮想アプライアンス機能を使ってバックアップした
  • 設定→PC 設定の変更→保守と管理→回復→全てを削除して Windows を再インストールする
    • 再インストールすると初回起動時に Windows Update がかかる。朝開始して会社から帰宅したら終わってた
  • 自宅サーバーの Samba に再接続してバックアップファイルをとりもどす

無いと話にならないものからインストールしていく

@alea12
alea12 / commit-msg
Last active August 29, 2015 13:57
hooks
#!/bin/sh
# Check whether commit message includes issue ID
exp="(?:close|closed|closes|fix|fixed|fixes|addresses|references|refs|re|see)"
exp=$exp".?(#[0-9]+(?:(?:[, &]+| *and *)#[0-9]+)*)"
grep -E "$exp" $1 > /dev/null
if [ $? -ne 0 ]; then
echo '*** ERROR ***'
echo 'You need to specify an issue ID to commit.'
@alea12
alea12 / chatwork.css
Created February 18, 2014 08:58
My Chatwork CSS
.avatarMedium, .avatarTiny {
display: none;
}
.chatTimeLineMessageHover {
background: inherit;
}
.chatTimeLineMessageMention {
background: #ddd;
@alea12
alea12 / tumblr.css
Last active January 4, 2016 13:59
Tumblr (http://www.tumblr.com/dashboard) dashboard custom css for ROMs
#right_column,
#new_post,
.selection_nipple,
#sidebar_footer_nav {
display: none;
}
#left_column {
float: none;
}