Skip to content

Instantly share code, notes, and snippets.

Steven Enten enten

Block or report user

Report or block enten

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@enten
enten / fromImageLoadEvents.ts
Created Apr 21, 2019
Create observable that emits when image load event occurred on element.
View fromImageLoadEvents.ts
/**
* Create observable that emits when image load event occurred on element.
*
* @param element
* @returns Observable on element's image load events
*/
export function fromImageLoadEvents(element: HTMLElement): Observable<HTMLImageElement> {
return new Observable<HTMLImageElement>(observable => {
const images: HTMLImageElement[] = [];
let loadListener: (event: ProgressEvent) => void;
@enten
enten / embark-angular-utils.js
Last active Oct 7, 2018
embark-angular-template: angular webpack config builder for embark
View embark-angular-utils.js
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const rimraf = require('rimraf');
const { filter } = require('rxjs/operators');
const { Architect } = require('@angular-devkit/architect');
const {
basename,
@enten
enten / atomik.scss
Last active Jun 30, 2018
atomik: responsive design in an atomic way
View atomik.scss
//
// atomik: responsive design in an atomic way.
//
// When responsive design must be or becomes an atomic job:
// let's atomik do the dirty work with a pretty-sugar api.
//
//
@enten
enten / package.json
Created Apr 2, 2018
Angular 6 dependencies
View package.json
{
"name": "angular-universal",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
@enten
enten / compose2.js
Last active Jan 2, 2018
Stamp factory which allows extra properties
View compose2.js
const assign = require('@stamp/core/assign')
const compose = require('@stamp/compose')
const isStamp = require('@stamp/is/stamp')
const merge = require('@stamp/core/merge')
const STAMP_DESCRIPTOR_VOID = {
'methods': {},
'properties': {},
'deepProperties': {},
'propertyDescriptors': {},
@enten
enten / jdg-tcg-cartes.js
Last active Dec 27, 2017
Joueur du Grenier : Trading Card Game
View jdg-tcg-cartes.js
module.exports = [
{
numero: 1,
type: 'invocation',
nom: 'Joueur Du Grenier',
famille: 'humain',
illustration: null,
description: 'Une carte originale',
descriptionDetaillee: `Saviez-vous que cette chemise a été achetée dans un magasin et que du coup cette carte n'a aucun effet spécial ?`,
attaque: 3,
@enten
enten / index.html
Last active Dec 15, 2017
Awesome Web Client
View index.html
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>Awesome</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<style>
View accessor.js
/** Usage */
const Accessor = require('./accessor')
const obj = {}
Accessor.in(obj).under('options')
.add('foo.bar', () => 'fallback foobar')
//.add('what.you.need', () => 'fallback value')
// { defaultFooBar: [Function: value],
@enten
enten / udk.js
Last active Aug 23, 2017
Universal Development Kit
View udk.js
const Compiler = require('webpack/lib/Compiler')
const MultiCompiler = require('webpack/lib/MultiCompiler')
const NodeEnvironmentPlugin = require('webpack/lib/node/NodeEnvironmentPlugin')
const Stats = require('webpack/lib/Stats')
const WebpackOptionsApply = require('webpack/lib/WebpackOptionsApply')
const WebpackOptionsDefaulter = require('webpack/lib/WebpackOptionsDefaulter')
const webpackOptionsSchema = require('webpack/schemas/webpackOptionsSchema.json')
const WebpackOptionsValidationError = require('webpack/lib/WebpackOptionsValidationError')
const validateSchema = require('webpack/lib/validateSchema')
View adsl3.js
const nodeNotifier = require('node-notifier')
const supportsColor = require('supports-color')
const {
inspect,
format
} = require('util')
const DEFAULT = {
colors: !!supportsColor,
You can’t perform that action at this time.