Skip to content

Instantly share code, notes, and snippets.

Avatar

Kim Biesbjerg biesbjerg

View GitHub Profile
View machine.js
const canSearch = (context, event) => {
return event.query && event.query.length > 0;
}
const fetchResults = async (context, event) => {
if (!context.query.length) {
throw new Error('No query specified');
}
return [
View machine.js
const fetchMachine = Machine({
id: "searchMachine",
initial: "idle",
context: {
query: "hest",
results: null,
suggestions: null,
errorMessage: null
},
states: {
View gist:971fda3f207e679aa37b9696b010fea9
➜ ng build
WARNING: Zone.js does not support native async/await in ES2017.
These blocks are not intercepted by zone.js and will not triggering change detection.
See: https://github.com/angular/zone.js/pull/1140 for more information.
WARNING: Using differential loading with targets ES5 and ES2016 or higher may
cause problems. Browsers with support for ES2015 will load the ES2016+ scripts
referenced with script[type="module"] but they may not support ES2016+ syntax.
ERROR in ./src/app/player/player.module.ts
Module not found: Error: Recursion in resolving
View gist:a3097893e7cfce015583f3f94bfabba7
mindly on  master [⇡✘»!+] is 📦 v3.1.3 took 8m 18s
➜ ionic serve -b
> ng run app:serve --host=localhost --port=8100
[ng] WARNING: Zone.js does not support native async/await in ES2017.
[ng] These blocks are not intercepted by zone.js and will not triggering change detection.
[ng] See: https://github.com/angular/zone.js/pull/1140 for more information.
[ng] chunk {} 0.js, 0.js.map () 31.1 kB [rendered]
[ng] chunk {app-onboarding-onboarding-module} app-onboarding-onboarding-module.js, app-onboarding-onboarding-module.js.map (app-onboarding-onboarding-module) 17.9 kB [rendered]
[ng] chunk {app-shop-containers-category-detail-category-detail-module} app-shop-containers-category-detail-category-detail-module.js, app-shop-containers-category-detail-category-detail-module.js.map (app-shop-containers-category-detail-category-detail-module) 5.89 kB [rendered]
[ng] chunk {app-shop-containers-product-collection-product-collection-module} app-shop-containers-product-collection-product-collection-module.js,
View gist:90bcb2080ee0c99e433294c25773addf
struct MusicPlayerTrack {
let id: String;
let src: String;
}
print("Printing options \(type(of: call.options["tracks"])): \(call.options["tracks"] ?? [])")
/*
Printing options Optional<Any>: (
{
id = "id_001";
View gist:6d7985ec3b2a3ddeb580abf9aeb39b3e
```
$this->loadModel('Cfc.Events');
$data = [
'eid' => rand(0, 99999),
'name' => 'TEST ' . rand(0, 99999),
'start_date_time' => Time::now(),
'end_date_time' => Time::now(),
'capacity' => 10,
View application-abd4e1a9aab02102f0c36662d7cca3be6871cc386f753acef8a141e8b25f252f.js
function UploadManager(t){var e=this;e.dropContainer=t.dropContainer,e.inputField=t.inputField,e.cancelContainer=t.cancelContainer,e.uploadsQueue=[],e._xhrs=[],e.activeUploads=0,e.data=t.data,e.key=t.key,e.maxSimultaneousUploads=t.maxSimultaneousUploads||-1,e.onFileAdded=t.onFileAdded||noop,e.uploadUrl=t.uploadUrl,e.onFileAddedProxy=function(t){console.log("Event: onFileAdded, file: "+t.fileName),e.onFileAdded(t)},e.initialize()}function FileUpload(t){var e=this;e.file=t,e.fileName=t.name,e.fileSize=t.size,e.uploadSize=t.size,e.uploadedBytes=0,e.eventHandlers={},e.events={onProgress:function(t,n){var i=n/t*100;console.log("Event: upload onProgress, progress = "+i+", fileSize = "+t+", uploadedBytes = "+n),(e.eventHandlers.onProgress||noop)(i,t,n)},onStart:function(){console.log("Event: upload onStart"),(e.eventHandlers.onStart||noop)()},onAborted:function(){console.log("Event: upload onAborted"),(e.eventHandlers.onAborted||noop)()},onCompleted:function(n){console.log("Event: upload onCompleted, data = "+n),t=n
View gist:706fcc9c2688426f0762a9840cd4a7f5
Copied /Users/kim/ionic/mindly-app/master/src/env/config.dev.ts to /Users/kim/ionic/mindly-app/master/src/app/app.config.ts
Running app-scripts build:
[12:56:50] build dev started ...
[12:56:50] clean started ...
[12:56:50] clean finished in 4 ms
[12:56:50] copy started ...
[12:56:50] transpile started ...
[12:56:54] transpile finished in 3.93 s
[12:56:54] preprocess started ...
[12:56:54] preprocess finished in less than 1 ms
View gist:f76b163fff49c3807b19946e47caba34
ionic run ios -l --device
The port was taken on the host 10.0.0.210 - using port 8000 instead
The port was taken on the host 10.0.0.210 - using port 8000 instead
> mindly-app@ ionic:serve /Users/kim/ionic/mindly-app/rc-wip
> ionic-app-scripts serve "--port" "8000" "--address" "10.0.0.210" "--liveReloadPort" "8000" "--nobrowser"
[06:01:15] ionic-app-scripts 0.0.45 
[06:01:15] watch started ...
View cordova-media-audio-engine.ts
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import { AbstractAudioEngine } from './abstract-audio-engine';
export class CordovaMediaAudioEngine extends AbstractAudioEngine {
private _play: Subject<boolean> = new Subject();
private _pause: Subject<boolean> = new Subject();
private _ended: Subject<boolean> = new Subject();