ã¢ã¯ã»ã¹ã©ã³ãã³ã°éè¨ã¹ã¯ãªããã®GA4対å¿
GA4対å¿ããµãã£ã¦ããã8æ17æ¥ã§ã¹ã¯ãªãããåä½ããªããªã£ã¦ããã
Ruby で Google Analytics 4 (GA4) のデータを API で取得する方法 - 約束の地 ã Google Analyticsの新バージョン!「Google Analytics 4(GA4)」のレポートデータをRubyで取得する - bagelee(ベーグリー) ãåèã«å¯¾å¿å®æ½ã
garb â google-api-ruby-client â 同 0.9 â google-analytics-data-v1beta ã¨å¤é·ãã¦ãããä»åãæå°éã®ä¿®æ£ã§æ¸ã¾ããã
sudo gem install google-analytics-data-v1beta
rubyã¯2.6.5ã ã£ãã2.7.8ã«ä¸ããã
require 'google/analytics/data/v1beta' def get_ga4(startdate,enddate,limitnum) ENV['ANALYTICS_DATA_CREDENTIALS'] = 'credentials.json' client = Google::Analytics::Data::V1beta::AnalyticsData::Client.new property = 'properties/XXXXXXXX' dimensions = [ Google::Analytics::Data::V1beta::Dimension.new(name: 'pagePath'), ] metrics = [ Google::Analytics::Data::V1beta::Metric.new(name: 'screenPageViews'), ] date_ranges = [ Google::Analytics::Data::V1beta::DateRange.new(start_date: startdate.strftime('%Y-%m-%d'), end_date: enddate.strftime('%Y-%m-%d')), ] request = Google::Analytics::Data::V1beta::RunReportRequest.new( property: property , dimensions: dimensions, metrics: metrics, dimension_filter: {:filter=>{:field_name=>"pagePath", :string_filter=>{ :match_type=> "BEGINS_WITH", :value=>"/wiki/"}}}, limit: limitnum.to_i, date_ranges: date_ranges ) response = client.run_report(request) result=Hash.new response.rows.each{|row| row.dimension_values.each_with_index{|d,i| result[CGI.unescape(d.value)]= row.metric_values[i].value } } result end #r=get_ga4(Date.today-7, Date.today-1, 30) #r.each{|i,v| # print i,":",v,"\n" #}
ChordWikiã®ãµã¼ãã移転
2/24ã®2:00ã5:00ã«ç§»è»¢ä½æ¥ãå®äºã
Cent OS 5ã§ã¯ãããããã£ã¦ãTLS 1.2ã«å¯¾å¿ããããã¨ãã§ãããChrome 81ã®ã¢ãããã¼ããè¿«ã£ã¦è¦åã¡ã¼ã«*1ãæ¥ãã®ã§ã3å¹´ã»ã©é ããã©ãããã移è¡ãè¿·ã£ããã©ããã¥ã¡ã³ããæã£ã¦ãããªCent OS 7ã¸ã
Â
rubyãyumã ã¨2.0ããå ¥ããªããã©ããããã«å¤ãã®ã§2.6ãã½ã¼ã¹ããã¤ã³ã¹ãã¼ã«ã
ããã¾ã§1.9ã§åããã¦ããã³ã¼ãã¯ãã»ã¼ãã®ã¾ã¾åããã
MySQLããMaria DBã«ãªã£ã¦ããã©ãmysql2ã§ä½ãå¤ããã«éã£ãã
Google Analyticsã®ãã¼ã¿ãåå¾ããgemã大ããå¤ãã£ã¦ãã¦ãgoogle-api-ruby-clientãéäºæãªã¢ãããã¼ãããããåèã«ä¿®æ£ããã
ãã¨Apacheã2.2ãã2.4ã«å¤ãã£ã¦mod_rewriteè¨å®ã«ä¸å ·åãèµ·ãã£ã¦æãå ¥ãããã©ããã¶ã大ä¸å¤«ã
Â
Â
*1:Google Search Console Team <sc-noreply@google.com> Jan 14, 2020, 9:13 AMãhttps://ja.chordwiki.org/ ã§ä½¿ç¨ããã¦ãã TLS 1.0/1.1 ã«é¢ããè¦åã Chrome ãã©ã¦ã¶ã§è¡¨ç¤ºãããããã«ãªãã¾ãã
2016å¹´ã®botéçº
ç«ã¦ç¶ãã«çºè¡¨ãããbotéçºãã©ãããã©ã¼ã ãä½ã£ã¦ã¿ãè¨äºãã¡ãã»ãè¦ããã¦ã¡ãã£ã¨ãããã¼ã ã£ã½ãã
Microsoft Bot Framework
Messaging API
Messengerプラットフォーム - ドキュメンテーション - 開発者向けFacebook
LINE BOT APIã§å½åNGã ã£ãLet's Encryptã®è¨¼ææ¸ãéãããã«ãªã£ãã¨ããåãèããã®ã§*1æ¨æ¥ãã使ããã¨ãã¦ãããä¸åã«ã³ã¼ã«ããã¯ãé£ãã§æ¥ãªãã
ãªã®ã§å
ã«Facebookããä½ã£ã¦ã¿ãã
ãã¡ããã¡ã試è¡é¯èª¤ãã¦ãããã¡ã«åãããã«ãªã£ãã
ã ãã©ããã£ã¦ãåã«ã¡ãã»ã¼ã¸ãæãã¦ããã ãã§ãTwitter APIã§åºæ¥ããã¨ã¨ä½ãå¤ãããªããããã¯9å¹´åã«éã£ãéã ã*2
èªç¶è¨èªå¦çãAIã使ã£ã¦åãã¦2016å¹´ã®botã¨è¨ããã ããã
日本はbot後進国になる運命かもね。 | ふくゆきブログ
ã ããæä¸ç¦ä¹ã®ãã®è¨äºãããéè¦ãããã¹ããªã®ã ããããã¯ããã§ã趣å³ã®ããã°ã©ãã³ã°ããã¯é ãé¢ããã¨ããã¸è¡ã£ã¦ãã¾ããããªã®ã§ããã
4/23追è¨
LINE BOT APIã®ã³ã¼ã«ããã¯ãå±ãããã«ãªã£ãã*3
Let's Encryptã®ãµã¼ã証ææ¸ã§SSL対å¿
さくらVPSで、Let’s Encryptのサーバ証明書を使って、SSL対応のサイトを作る設定手順
ãè¦ã¦ãã£ã¦ã¿ããã¨æã£ãããCentOS 5ã§ã¯ãã®éãã«è¡ããªãã£ã½ãã
ã¾ãPythonã2.6以ä¸å¿
è¦ã¨è¨ãããã2.4ããå
¥ã£ã¦ããªããyumã«2.6ãããã®ã§ã¤ã³ã¹ãã¼ã«ï¼"python26"ã«ãªãï¼ãã¦ã¹ã¯ãªããã®ä¸ã®python27ãpython26ã«å¤ãã¦ãç¡çã ã£ãã
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
ããã¤ã³ã¹ãã¼ã«ãã¦"python2.7"ãéãããã«ãã¦ããã£ã±ãé§ç®ã ã£ãã
KeyError: 'webroot'
ã¨ãªã£ã¦æ¢ã¾ãã
Letsencrypt-auto certonly fails with KeyError: 'webroot' - Help - Let's Encrypt Community Support
ãè¦ã¦ãpythonã«ä¾åããªã
GitHub - Neilpang/acme.sh: A pure Unix shell script implementing ACME client protocol
ã使ããã¨ã«ããã証ææ¸ã®æ´æ°ãèªåã§ãã£ã¦ãããããããããã便å©ãããã*1
git clone https://github.com/Neilpang/le.git cd le ./le.sh install sudo ./le issue /var/www/html/ www.example.com
ãã¦çæããããã¡ã¤ã«ã /etc/httpd/conf.d/ssl.conf ã«
SSLCertificateFile /home/hoge/.le/www.example.com/www.example.com.cer SSLCertificateKeyFile /home/hoge/.le/www.example.com/www.example.com.key SSLCertificateChainFile /home/hoge/.le/www.example.com/ca.cer
ã§æå®ã
sudo /etc/rc.d/init.d/httpd restart
ã§ä¸å¿åããã£ã½ãã
ãã ãTLS1.0ãã使ãã¦ããªãã®ã§ãå¤ãæå·ã¹ã¤ã¼ããã¨è¨ããã¦ãã¾ããCentOS 5ã§ã¯OpenSSLã0.9.8ã®ããã
$ cat /etc/redhat-release CentOS release 5.11 (Final)
CentOS5ã®ãµãã¼ãæéã§ãã2017å¹´3æ31æ¥ã¾ã§ã«ã¯OSãã¼ã¸ã§ã³ã¢ãããå¿
é ã
2015年いっぱいでOpenSSL0.9.8のアップデートが無くなる? - Qiita
*1:æå¹æéã5æ13æ¥ã¾ã§ã«ãªã£ã¦ããã®ãã¡ããã¨æ´æ°ãããã確èªã
Rubyã§Google Analytics APIã®OAuth2èªè¨¼å¯¾å¿
YouTube API v2ãçµäºããã®ã«å ãã¦ãAnalytics APIãOAuth2ãå¿
è¦ã«ãªã£ãã
YouTubeã®æ¹ã¯éãªãã§è¡ãããã©ãAnalyticsã®æ¹ã¯Garbã®ã¾ã¾ã§ã¯é§ç®ã£ã½ãã
RubyのバッチでGoogleAnalyticsのデータを取得する(OAuth2利用) - zakihayaメモ
ããåèãGoogle Developers Consoleã§Analytics APIãæå¹ã«ããã®ãå¿ããªãããã«ã
zenbackãSSLãã¼ã¸ã§åä½ããªã
[blocked] The page at 'https://xxxx/' was loaded over HTTPS, but ran insecure content from 'http://w.zenback.jp/v1/?callback=jQueryxxxx': this content should also be loaded over HTTPS.
ã¨è¨ãããã
http://w.zenback.jp/v1/ ã®57è¡ç®ã
url: "http:\/\/w.zenback.jp\/v1\/"
ãªã®ã§
url: "\/\/w.zenback.jp\/v1\/"
ã«ç´ãããã®ãèªåã§ãµã¼ãã«ç¨æãã¦èªã¿è¾¼ãã§ã¿ãã¨ä¸å¿åããï¼randãåãåã£ã¦åãè¾¼ãã ãï¼
ãããããã«Twitterãã¯ã¦ãªããã¯ãã¼ã¯ã®ãã¿ã³ç¨jsãèªã¿è¾¼ãé¨åã§http:ãæå®ããã¦ãããä»åº¦ã¯è§£èªããé¨åãé·ãã®ã§ãããããã
ã¨ãããéä¸ã¾ã§ã¯ã//w.zenback.jp/ããã§è¨è¿°ãã¦SSLã«å¯¾å¿ãã¦ããã¨è¦ãããã¦ãæå¾ã¾ã§å¾¹åºãã¦ããªãã®ã¯ä¸å ·åã ããã
ChordWikiã®æ¡å¼µæ å ±ãDBä¿æï¼ã¿ã°ã®ANDæ¤ç´¢
chordproè¨æ³ãåæã«æ¡å¼µãã¦è¨è¿°ãã¦ããASINãYouTubeãniconicoãªã³ã¯ããå¤ã«åºãã¦MySQLã«ä¿æãã¤ãã§ã«JASRACä½åã³ã¼ããæã¦ãããã«ã
ã¿ã°æ¤ç´¢ã¯ANDæ¤ç´¢ãå¯è½ã«ãåããã¼ãã«å士ãJOINãã¦ããã«ããä¸åLEFT JOINããã¨ããSQLããã£ããæ¸ããã