Skip to content

Instantly share code, notes, and snippets.

View wehowski's full-sized avatar

Melanie Wehowski wehowski

View GitHub Profile
@wehowski
wehowski / MimeStub.php
Last active August 30, 2017 11:19
MimeStub forked from https://github.com/Riverline/multipart-parser -> "self executing" php scripts
<?php
/**
* Copyright (c) 2017, Till Wehowski
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
function compileTemplateUrl(directives, $compileNode, tAttrs,
$rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {
var linkQueue = [],
afterTemplateNodeLinkFn,
afterTemplateChildLinkFn,
beforeTemplateCompileNode = $compileNode[0],
origAsyncDirective = directives.shift(),
derivedSyncDirective = inherit(origAsyncDirective, {
templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective
}),
<script type="text/javascript">
var util = require('util');
var opts = {
showHidden : true,
depth : 4
};
console.on('*', function(type, data){
var color = 'black';
@wehowski
wehowski / gist:b4fcace9706228949d8f6ae2a53fb5bb
Created April 8, 2016 01:08
whenEver.when-then-do-with-me-or.js
/*
* from µ.Flow
* http://api.webfan.de/api-d/4/js-api/library.js
*/
this.whenEver=function(condition, callback, args, delay){
if(('function'===typeof condition && true === condition())
|| (true === (condition))
){
@wehowski
wehowski / parseMime.php
Last active April 3, 2016 01:00
parseMime - MIME-Type fragments extractor [php] http://interface.api.webfan.de/v1/public/registry/type/
<?php
/**
* http://interface.api.webfan.de/v1/public/registry/type/
* */
$webfanApplicationMimetypeFilter = array(
'mime' => function($str){
return true;
},
'type' => function($str){