VirtualBox仮想マシンのネットワークはデフォルトでNATとなっている。
VirtualBox の場合、NAT ネットワークアダプタには 10.0.2.0/24 の IP アドレスが割り当てられ、ゲスト OS から見える ホスト OS の IP アドレスには 10.0.2.2 が設定される仕様。
したがってホストOS上に建てたサーバーにゲストOSからアクセスしたい場合は、http://10.0.2.2とアクセスすれば普通に見ることができる。
| # encoding: UTF-8 | |
| Earthquake.once do | |
| module TwitterOAuth | |
| class Client | |
| def list_statuses(user, list, **options) | |
| options = URI.encode_www_form(options) | |
| get("/lists/statuses.json?slug=#{list}&owner_screen_name=#{user}&#{options}") | |
| end | |
| end | |
| end |
VirtualBox仮想マシンのネットワークはデフォルトでNATとなっている。
VirtualBox の場合、NAT ネットワークアダプタには 10.0.2.0/24 の IP アドレスが割り当てられ、ゲスト OS から見える ホスト OS の IP アドレスには 10.0.2.2 が設定される仕様。
したがってホストOS上に建てたサーバーにゲストOSからアクセスしたい場合は、http://10.0.2.2とアクセスすれば普通に見ることができる。
| source 'https://rubygems.org' | |
| gem 'earthquake', | |
| git: 'https://github.com/kaosf/earthquake', | |
| branch: 'master' | |
| # SHA1: b845de4c363aa3df7820f049d36aae210969d1d2 | |
| gem 'twitter-stream', | |
| git: 'https://github.com/kaosf/twitter-stream', | |
| branch: 'master' |
| module HelperExamplesExtensions | |
| # Copy of stub_template from view specs | |
| # @see RSpec::Rails::ViewExampleGroup::ExampleMethods#stub_template | |
| def stub_template(hash) | |
| view.view_paths.unshift(ActionView::FixtureResolver.new(hash)) | |
| end | |
| end | |
| RSpec.configure do |config| | |
| config.include HelperExamplesExtensions, type: :helper |
| # encoding: UTF-8 | |
| Earthquake.once do | |
| module TwitterOAuth | |
| class Client | |
| def favorites_list(user, **options) | |
| options = URI.encode_www_form(options) | |
| get("/favorites/list.json?screen_name=#{user}&#{options}") | |
| end | |
| end | |
| end |
| var getPosition = function (options) { | |
| return new Promise(function (resolve, reject) { | |
| navigator.geolocation.getCurrentPosition(resolve, reject, options); | |
| }); | |
| } | |
| getPosition() | |
| .then((position) => { | |
| console.log(position); | |
| }) |
| # encoding: UTF-8 | |
| Earthquake.once do | |
| module TwitterOAuth | |
| class Client | |
| def search_queries(q, **options) | |
| q = URI.encode_www_form_component(q) | |
| options = URI.encode_www_form(options) | |
| get("/search/tweets.json?q=#{q}&#{options}") | |
| end | |
| end |
| // ==UserScript== | |
| // @name Add New Issue Template Link | |
| // @namespace https://github.com/akinov | |
| // @version 0.3 | |
| // @description New Issue Templateを簡単に | |
| // @author akinov | |
| // @match https://github.com/*/issues* | |
| // @grant none | |
| /* load jQuery */ | |
| // @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js |
(この記事はFarmnote Advent Calendar 21 日目の記事です)
札幌オフィスの金井(@kn1kn1)です。主にFarmnote ColorのETLを担当しています。
私にとっての2018年は、RubyKaigiでの登壇やAlgorave Tokyoへの出演があり、そして何よりも第二子誕生があって多忙な日々でした。関係した皆様に感謝致します。
さて、アドベントカレンダーということですが、諸々の都合(主に私の時間の都合)で技術的にゆるい話題になりました。きちんとした内容の記事をご所望の方は、ぜひ他のメンバーのエントリーをどうぞ。