bashで出来たシステムモニタ
各ディストリのマークとか出る
xset q
xset -dpms
xset dpms force off
xset +dpmsスタンバイ、サスペンド、パワーオフ時間を設定(有効化時しか意味は無い)
xset dpms 300 600 900
following <div> {block:Followed} <a href="{FollowedURL}"><img src="{FollowedPortraitURL-48}"/></a> {/block:Followed} </div> {/block:Following}
#!/usr/bin/env ruby # coding: utf-8 require 'rubygems' require 'oauth' OAUTH_CONSUMER_KEY='XXXXXXXXXXXXXXXXXXXXXXXXXX' OAUTH_CONSUMER_SECRET='XXXXXXXXXXXXXXXXXXXXXXXX' consumer = OAuth::Consumer.new( OAUTH_CONSUMER_KEY , OAUTH_CONSUMER_SECRET , { :site=>"http://twitter.com" }) #optprm = { :oauth_callback=>"(コールバック先のURL)" } request_token = consumer.get_request_token puts "Access this URL and approve => #{request_token.authorize_url}" print "Input OAuth Verifier: " oauth_verifier = gets.chomp.strip access_token = request_token.get_access_token( :oauth_verifier => oauth_verifier ) puts "Access token: #{access_token.token}" puts "Access token secret: #{access_token.secret}"
#!/usr/bin/env ruby # coding: utf-8 require 'oauth' require 'json' CONSUMER_KEY = 'XXXXXXXXXXXXXXXXXXXXX' CONSUMER_SECRET = 'XXXXXXXXXXXXXXXXXXXX' ACCESS_TOKEN = 'XXXX-XXXX' ACCESS_TOKEN_SECRET = 'XXXXXXXXXXXXXXXXX' # 下準備 consumer = OAuth::Consumer.new( CONSUMER_KEY, CONSUMER_SECRET, :site => 'http://twitter.com' ) access_token = OAuth::AccessToken.new( consumer, ACCESS_TOKEN, ACCESS_TOKEN_SECRET ) # タイムラインを取得して時系列順に表示 response = access_token.get('http://twitter.com/statuses/friends_timeline.json') JSON.parse(response.body).reverse_each do |status| user = status['user'] puts "#{user['name']}(#{user['screen_name']}): #{status['text']}" end # Tweetの投稿 #response = access_token.post( # 'http://twitter.com/statuses/update.json', # 'status'=> 'oauth test post2' #)
#!/usr/bin/env ruby # coding: utf-8 require 'twitter' # ログイン Twitter.configure do |config| config.consumer_key = 'XXXXXXXXXXXXXXXX' config.consumer_secret = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' config.oauth_token = 'XXXXXXX-XXXXXXXXX' config.oauth_token_secret = 'XXXXXXXXXXXXXXXXXX' end #発言する #puts Twitter.home_timeline.first.text Twitter.update('hoge')