I looked around for a good popover library for Ember. I couldn't find one I liked (and was compatible with Ember 1.13 and Glimmer), so I whipped up a little ditty:
// app/pop-over/component.js
import $ from "jquery";| const fs = require('fs'); | |
| const puppeteer = require('puppeteer'); | |
| const GIFEncoder = require('gifencoder'); | |
| const PNG = require('png-js'); | |
| function decode(png) { | |
| return new Promise(r => {png.decode(pixels => r(pixels))}); | |
| } |
I looked around for a good popover library for Ember. I couldn't find one I liked (and was compatible with Ember 1.13 and Glimmer), so I whipped up a little ditty:
// app/pop-over/component.js
import $ from "jquery";A description of how to run an existing CouchApp on PouchDB in the browser using service workers - without any modifications to existing code being necessary! The best thing is that if service workers aren't available, the CouchApp will still run as normal: that is, online.
| #!/usr/bin/env bash | |
| # This script installs brew and chowns the right directories needed to run | |
| # brew as a standard user. Your user should be the owner of /usr/local which | |
| # gets set during the installation of brew. The global homebrew cache directory | |
| # group should be set to 'staff' which is not set during a brew install. This | |
| # script fixes that. | |
| # To begin, you MUST execute this script with your user account while it has | |
| # admin privileges. Once the script completes, you can change your |
| import Ember from "ember"; | |
| var get = Ember.get; | |
| var copy = Ember.copy; | |
| var removeObserver = Ember.removeObserver; | |
| var addObserver = Ember.addObserver; | |
| var DocumentTitleMixin = Ember.Mixin.create({ | |
| titleTokensDidChange: function () { |
| # | |
| # OpenSSL example configuration file. | |
| # This is mostly being used for generation of certificate requests. | |
| # | |
| # This definition stops the following lines choking if HOME isn't | |
| # defined. | |
| HOME = . | |
| RANDFILE = $ENV::HOME/.rnd |
| module.exports = (grunt) -> | |
| timestamp = Date.now().toString() | |
| grunt.initConfig | |
| env: grunt.file.readJSON '.env.json' | |
| s3: | |
| options: | |
| key: '<%= env.AWS.AccessKeyId %>' | |
| secret: '<%= env.AWS.SecretKey %>' |
Data Down / Actions Up
Plain JSBin's
Ember Version Base JSBin's
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
| // Record changes to an ObjectProxy and allow them to be stepped through | |
| // or jumped to. | |
| // | |
| // For an example, see http://emberjs.jsbin.com/EJEcoxO/12/edit?html,js,output | |
| // | |
| // There is a bower/npm installable version of this library on GitHub: | |
| // https://github.com/mixonic/ember-vcr-proxy | |
| // | |
| (function (global) { |