Skip to content

Instantly share code, notes, and snippets.

View willrax's full-sized avatar
👨‍💻

Will Raxworthy willrax

👨‍💻
View GitHub Profile
@willrax
willrax / application.controller.js
Last active December 24, 2015 17:32
oneWay WAT
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'
@willrax
willrax / application.controller.js
Last active December 6, 2015 09:26
shared-component-state
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
{{! this example will move the cursor to the end each time
you type, even if you are in the middle of the input value}}
<input value={{inputText}} oninput={{action (mut inputText) value="target.value"}}>
{{! this example wont}}
<input value={{inputText}} onchange={{action (mut inputText) value="target.value"}}>
{{! notice the different events}}
@willrax
willrax / ecto-error.sh
Created July 19, 2015 13:19
ecto-error.sh
$ 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
@willrax
willrax / Gulpfile.js
Last active August 29, 2015 14:14
Angular, Gulp and a Server
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 = [
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
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
# Generating bridgesupport files on the command line.
# via @markvillacampa (http://markvillacampa.com/2012/06/09/how-to-use-objective-c-libraries-with-rubymotion/)
gen_bridge_metadata -F complete --no-64-bit -c '-I.' *.h -o BridgeSupport.bridgesupport
@willrax
willrax / handoff.md
Created July 25, 2014 01:15
Setting up hand off.

source: http://forums.macrumors.com/showthread.php?t=1757410

I searched the Internet for hours trying to figure out how to get Hand off and Continuity and phone calls to work. I thought I'd put all that stuff in one place and hopefully save someone the trouble of trying to collect this information themselves.

Initial Steps:

-On your Mac go to About this Mac > System Report. Under the Bluetooth Category your LMP version needs to be 0x6.. Anything lower will not work.

-On Your Mac: Go to system preferences > General > and click the "allow handoff" box at the bottom.

@willrax
willrax / double.sh
Created July 24, 2014 10:15
AppleDouble
# Used to remove apple doubles before nas copying.
find . -type d | xargs dot_clean -m