Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@fozy81
fozy81 / components.list\.js
Last active January 6, 2021 09:33
New Twiddle
import Component from '@glimmer/component';
export default class extends Component {
}
@fozy81
fozy81 / ember-mental-model.md
Last active June 21, 2019 18:29
Ember mental model

Ember mental model

  • All aboard the Ember train! choo choo

Ember is like a train set. Using small, composable pieces, an ambitious railway of trains, lines and stations can be constructed.

Templates

Each station is a web page made from a Template. Templates are written in a language called Handlebars - an extended version of html. You can build your station using just the handlebar template.

Components

@fozy81
fozy81 / prediction
Created April 7, 2019 14:46
brexit vote prediction
library(tidyverse)
brexit_bill <- data.frame(
date = c("2019-01-15",
"2019-03-12",
"2019-03-29"),
votes_lost_by = c(230,
@fozy81
fozy81 / controllers.application.js
Created December 28, 2016 17:55 — forked from poteto/controllers.application.js
ember-changeset-validations demo
import Ember from 'ember';
import AdultValidations from '../validations/adult';
import ChildValidations from '../validations/child';
import { reservedEmails } from '../validators/uniqueness';
import { schema } from '../models/user';
const { get } = Ember;
const { keys } = Object;
export default Ember.Controller.extend({
library(ggmap)
df <- data.frame(
lat = c(55.56, 55.53),
lon = c(-4.5760,-4.52),
value = c("Good","Bad")
)
install.packages("osmar")
library(osmar)
route <- get_osm(relation(3619145), full = TRUE) # get the route with all the ways/nodes
wUser <- as.data.frame(summary(kaufstr_full$ways$attrs$user)) # get the User names who edited the ways
nUser <- as.data.frame(summary(kaufstr_full$nodes$attrs$user)) # get the User names who edited the nodes
allUser <- as.data.frame(c(row.names(wUser), row.names(nUser))) # create a data.frame (like a table) of user names
length(unique(allUser[,1])) # count unique number of user names