This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Client < Android::OS::AsyncTask | |
| def doInBackground(params) | |
| url = Java::Net::URL.new("http://www.bom.gov.au/fwo/IDN60901/IDN60901.94768.json") | |
| reader = Java::IO::BufferedReader.new(Java::IO::InputStreamReader.new(url.openStream)) | |
| builder = Java::Lang::StringBuilder.new("") | |
| while ((line = reader.readLine()) != nil) do | |
| builder.append(line) | |
| end | |
| puts builder.toString |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def setup_google_services | |
| @google_client = Com::Google::Android::Gms::Common::Api::GoogleApiClient::Builder.new(self) | |
| @google_client.addConnectionCallbacks(self) | |
| @google_client.addApi(Com::Google::Android::Gms::Location::LocationServices::API) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require("gulp"), | |
| gutil = require("gulp-util"), | |
| jshint = require("gulp-jshint"), | |
| concat = require("gulp-concat"), | |
| clean = require("gulp-clean"), | |
| connect = require("gulp-connect"), | |
| sourcemaps = require("gulp-sourcemaps"), | |
| bowerPath = "bower_components/"; | |
| var bowerComponents = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ mix ecto.migrate | |
| ** (MatchError) no match of right hand side value: %{columns: ["count"], command: :select, num_rows: 1, rows: [[0]]} | |
| (ecto) lib/ecto/adapters/postgres.ex:61: Ecto.Adapters.Postgres.ddl_exists?/3 | |
| (ecto) lib/ecto/migration/schema_migration.ex:19: Ecto.Migration.SchemaMigration.ensure_schema_migrations_table!/1 | |
| (ecto) lib/ecto/migrator.ex:36: Ecto.Migrator.migrated_versions/1 | |
| (ecto) lib/ecto/migrator.ex:134: Ecto.Migrator.run/4 | |
| (mix) lib/mix/cli.ex:55: Mix.CLI.run_task/2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName:'Ember Twiddle' | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName:'Ember Twiddle', | |
| name: "ten", | |
| tennison: Ember.Object.create({ | |
| name: 'tennison', | |
| friend: Ember.Object.create({ | |
| name: 'will' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Plugger.Mixfile do | |
| use Mix.Project | |
| # Project setup <snip> | |
| def application do | |
| [applications: [:logger, :cowboy, :plug], | |
| mod: {Plugger, []}] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Plugger.Router do | |
| use Plug.Router | |
| plug :match | |
| plug :dispatch | |
| def start_link do | |
| Plug.Adapters.Cowboy.http(Plugger.Router, []) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Plugger.Router do | |
| plug Plugger.SayHello, [name: “Will”] | |
| end | |
| defmodule Plugger.SayHello do | |
| def init(opts), do: opts | |
| def call(conn, opts) do | |
| IO.puts opts[:name] | |
| conn |