Skip to content

Instantly share code, notes, and snippets.

module StartAppTest where
import Html exposing (text, Html)
import StartApp
import Effects exposing (Effects)
import Time
import Signal exposing (Address)
type alias Model = Float
#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------
# - Where to Log -
log_destination = 'csvlog' # Valid values are combinations of
# stderr, csvlog, syslog, and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on.
# This is a command configuration to be used with https://github.com/derhasi/buddy
commands:
# calls the global composer command from the root folder
composer:
cmd: composer
workingDir: $DIR
# Calls a local drush command in ./vendor/bin/drush
drush:
cmd: drush
cmdDir: $DIR/vendor/bin
@jerbob92
jerbob92 / ImageRenderExampleBlockByURI.php
Created October 28, 2015 13:21
Render image into a block Drupal 8 Example by URI
<?php
/**
* @file
* Contains Drupal\mymodule\Plugin\Block\ImageRenderExampleBlockByURI.
*/
namespace Drupal\mymodule\Plugin\Block;
use Drupal\Core\Block\BlockBase;
@mchavezi
mchavezi / Elm Gulp Config
Created October 20, 2015 18:11
Gulp file for compiling multiple Elm files.
var Path = require('path');
var Gulp = require('gulp');
var Elm = require('gulp-elm');
var Concat = require('gulp-concat');
var Newer = require('gulp-newer');
Gulp.task('elm-init', Elm.init);
Gulp.task('elm', ['elm-init'], function () {
@benmirkhah
benmirkhah / gulpfile.js
Last active February 9, 2016 09:40
Drupal Omega 4 Libsass & Livereload Gulp file
/*
First time usage needs the following dependencies installed:
sudo npm install --save-dev del gulp gulp-plumber gulp-sass gulp-watch gulp-autoprefixer gulp-debug gulp-css-globbing gulp-livereload gulp-order gulp-sourcemaps gulp-svg2png gulp-newer gulp-size
bower init
bower install susy --save
bower install sass-toolkit --save
bower install breakpoint-sass --save
*/
//Source / Destination / Path settings
@webbj74
webbj74 / init-org.el
Created September 22, 2015 20:00
org-mode file+function capture template example
;; I am not a regular emacs user and haven't played with lisp for many years.
;; I struggled for a couple of days trying to tweak org-capture-templates to
;; get my desired behavior for journal entries. I hope this helps someone!
;;
;; I have been following the excellent guide http://doc.norang.ca/org-mode.html
;; The "journal" template was the one I wanted to tweak. I use a date-based
;; journal filename, e.g. "2015-09-22-Journal-Entry.org". The contents of the
;; file consist of a top-level headline with a human-friendly date, followed
;; by second-level headline with the time and brief journal note. For example:
;;
@miohtama
miohtama / droneio.bash
Created August 26, 2015 22:58
drone.io continuous integration + Python 3.4 + Selenium + SSH key setup for private repos + codecov coverage
#!/bin/bash
#
# Setup test running for Ubuntu 12.02 / Drone IO
#
# As drone.io build command put:
#
# # Launch the droneio test script from the repo
# bash bin/droneio.bash # Whereever you put this script in your source code control
#
#
import Html exposing (div, button, text, input, node)
import Html.Events exposing (onClick)
import Html.Attributes exposing (type', class)
import StartApp
main =
StartApp.start { model = model, view = view, update = update }
model = []
@mgold
mgold / using_mailboxes_in_elm.md
Last active March 24, 2020 16:05
Using Mailboxes in Elm: a tutorial blog post

Using Mailboxes in Elm

Max Goldstein | July 30, 2015 | Elm 0.15.1

In Elm, signals always have a data source associated with them. Window.dimensions is exactly what you think it is, and you can't send your own events on it. You can derive your own signals from these primitives using map, filter, and merge, but the timing of events is beyond your control.

This becomes a problem when you try to add UI elements. We want to be able to add checkboxes and dropdown menus, and to receive the current state of these elements as a signal. So how do we do that?

The Bad Old Days