Skip to content

Instantly share code, notes, and snippets.

View indiealexh's full-sized avatar

Alexander Haslam indiealexh

View GitHub Profile
@indiealexh
indiealexh / main.dart
Created December 28, 2021 17:21
json object of objects to list
import 'dart:convert';
void main() {
String json =
'{"0": {"hello":"world"},"1": {"hello":"dave"},"2": {"hello":"alex"}}';
print(json);
var object = jsonDecode(json);
print(object);
List helloList =
object.entries.map((entry) => Hello(entry.value["hello"])).toList();
@indiealexh
indiealexh / controller.js
Created December 31, 2015 19:51
Mithril Js Two Way binding with radio buttons (ES6)
import VM from './viewModel';
export default class Controller {
constructor(args) {
var ctrl = this;
ctrl.vm = new VM(args);
return this;
}
}
var elixir = require('laravel-elixir');
elixir(function(mix) {
mix.copy('resources/assets/foundation/bower_components/foundation/scss', 'resources/assets/sass');
mix.copy('resources/assets/foundation/scss', 'resources/assets/sass');
mix.sass('app.scss');
mix.copy('resources/assets/foundation/bower_components/foundation/js', 'resources/assets/js');
mix.copy('resources/assets/foundation/js', 'resources/assets/js');
mix.scripts(['vendor/jquery.js', 'vendor/modernizr.js', 'foundation.js', 'app.js'], "public/js/main.js");
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@indiealexh
indiealexh / designer.html
Last active August 29, 2015 14:21
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@indiealexh
indiealexh / designer.html
Last active August 29, 2015 14:15
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@indiealexh
indiealexh / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@indiealexh
indiealexh / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
/**
* Created by ahaslam on 26/11/2014.
*/
var Twit = require('twit')
var T = new Twit({
consumer_key: 'key',
consumer_secret: 'ssshitsasecret',
access_token: 'mymothersays',
access_token_secret: 'mydadsays'