I hereby claim:
- I am gbuesing on github.
- I am gbuesing (https://keybase.io/gbuesing) on keybase.
- I have a public key ASC44xkHYLkEbRYoSApMVLq2Bxr2c0PxWMbVVszNNqiFmwo
To claim this, I am signing this object:
| Dark Sky Attribute Name | JSON Path | Units (US) | |
|---|---|---|---|
| time | dt | seconds since UNIX epoch | |
| temperature | main.temp | °F | |
| apparentTemperature | N/A | N/A | |
| dewPoint | main.dew_point | °F | |
| humidity | main.humidity | % | |
| pressure | main.pressure | hPa | |
| windSpeed | wind.speed | mph | |
| windGust | wind.gust | mph | |
| windBearing | wind.deg | ° |
| Dark Sky Attribute Name | JSON Path in Open Meteo Forecast API | |
|---|---|---|
| time | $.forecast.timestamp | |
| summary | $.forecast.weather.description | |
| icon | $.forecast.weather.icon | |
| sunriseTime | $.forecast.sunrise | |
| sunsetTime | $.forecast.sunset | |
| moonPhase | $.forecast.moon_phase | |
| precipIntensity | $.forecast.rain | |
| precipProbability | $.forecast.probability_of_precipitation | |
| precipType | $.forecast.weather.icon |
| Map attributes from the open meteo forecast api to the format used by the Dark Sky API | |
| The Open Meteo Forecast API and the Dark Sky API have different attribute names and structures, so mapping the attributes from one API to another requires some translation. Here's a list of Open Meteo Forecast API attributes and their corresponding Dark Sky API attributes: | |
| Temperature | |
| Open Meteo Forecast API: "temp" | |
| Dark Sky API: "temperature" | |
| Minimum temperature | |
| Open Meteo Forecast API: "temp_min" | |
| Dark Sky API: "temperatureMin" | |
| Maximum temperature |
I hereby claim:
To claim this, I am signing this object:
| # database 1 | |
| # output single row in format compatible with INSERT VALUES | |
| \copy (SELECT * FROM users WHERE email = '[email protected]') To stdout With CSV force quote * null 'NULL' quote '''' | |
| # database 2 | |
| # insert values outputted from above command into another database | |
| INSERT INTO users VALUES (...); |
| # Blocks until response received | |
| # Designed to be run from a background job, not in request-response | |
| # Usage: | |
| # assembly = Transloadit::Rails::Engine.template :my_template | |
| # response = TransloaditBlockingAssemblyRunner.run assembly | |
| # results = response['results'] | |
| module TransloaditBlockingAssemblyRunner | |
| class Error < StandardError; end | |
| class TimeoutError < Error; end | |
| class AssemblyError < Error; end |
| gem 'resque-scheduler' |
| require 'rest-client' | |
| require 'json' | |
| module Neo4jClient | |
| SERVER = 'http://neo4j:neo4j@localhost:7474' | |
| def self.cypher query, params = {} | |
| resp = RestClient.post("#{SERVER}/db/data/cypher", {query: query, params: params}.to_json, content_type: :json, accept: :json) | |
| JSON.parse resp | |
| end |
| // delare WKScriptMessageHandler as delegate | |
| // add to WKWebViewConfiguration init: | |
| configuration.userContentController.addScriptMessageHandler(self, name: "log") | |
| // MARK: WKScriptMessageHandler | |
| func userContentController(userContentController: WKUserContentController, didReceiveScriptMessage message: WKScriptMessage) { | |
| if (message.name == "log") { | |
| print(message.body) | |
| } |
| // declare WKUIDelegate as a delegate for ApplicationController | |
| lazy var session: TLSession = { | |
| let session = TLSession(webViewConfiguration: self.webViewConfiguration) | |
| session.delegate = self | |
| session.webView.UIDelegate = self // add this | |
| return session | |
| }() | |
| // MARK: WKUIDelegate |