Skip to content

Instantly share code, notes, and snippets.

View sod's full-sized avatar
🤨

Alexander von Weiss sod

🤨
View GitHub Profile
var categoryExport = ``;
var lineRx = /^(\t*)(\d+) (.+)$/;
var toSlug = function(label) {
return String(label).replace('&', 'und').replace(/[^a-z0-9]/ig, '-');
};
var toCategoryObject = function(category) {
category = lineRx.exec(category);
return {
!function(e){function r(e,r,o){return 4===arguments.length?t.apply(this,arguments):void n(e,{declarative:!0,deps:r,declare:o})}function t(e,r,t,o){n(e,{declarative:!1,deps:r,executingRequire:t,execute:o})}function n(e,r){r.name=e,e in p||(p[e]=r),r.normalizedDeps=r.deps}function o(e,r){if(r[e.groupIndex]=r[e.groupIndex]||[],-1==v.call(r[e.groupIndex],e)){r[e.groupIndex].push(e);for(var t=0,n=e.normalizedDeps.length;n>t;t++){var a=e.normalizedDeps[t],u=p[a];if(u&&!u.evaluated){var d=e.groupIndex+(u.declarative!=e.declarative);if(void 0===u.groupIndex||u.groupIndex<d){if(void 0!==u.groupIndex&&(r[u.groupIndex].splice(v.call(r[u.groupIndex],u),1),0==r[u.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");u.groupIndex=d}o(u,r)}}}}function a(e){var r=p[e];r.groupIndex=0;var t=[];o(r,t);for(var n=!!r.declarative==t.length%2,a=t.length-1;a>=0;a--){for(var u=t[a],i=0;i<u.length;i++){var s=u[i];n?d(s):l(s)}n=!n}}function u(e){return x[e]||(x[e]={name:e,dependencies:[],exports:{},importers:[]})}f
@sod
sod / build.js
Created February 15, 2016 15:03
!function(e){function r(e,r,o){return 4===arguments.length?t.apply(this,arguments):void n(e,{declarative:!0,deps:r,declare:o})}function t(e,r,t,o){n(e,{declarative:!1,deps:r,executingRequire:t,execute:o})}function n(e,r){r.name=e,e in p||(p[e]=r),r.normalizedDeps=r.deps}function o(e,r){if(r[e.groupIndex]=r[e.groupIndex]||[],-1==v.call(r[e.groupIndex],e)){r[e.groupIndex].push(e);for(var t=0,n=e.normalizedDeps.length;n>t;t++){var a=e.normalizedDeps[t],u=p[a];if(u&&!u.evaluated){var d=e.groupIndex+(u.declarative!=e.declarative);if(void 0===u.groupIndex||u.groupIndex<d){if(void 0!==u.groupIndex&&(r[u.groupIndex].splice(v.call(r[u.groupIndex],u),1),0==r[u.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");u.groupIndex=d}o(u,r)}}}}function a(e){var r=p[e];r.groupIndex=0;var t=[];o(r,t);for(var n=!!r.declarative==t.length%2,a=t.length-1;a>=0;a--){for(var u=t[a],i=0;i<u.length;i++){var s=u[i];n?d(s):l(s)}n=!n}}function u(e){return x[e]||(x[e]={name:e,dependencies:[],exports:{},importers:[]})}f
var convertToString = function(array) {
return array.map((item, index) => '"' + index + ' ' + item.replace(/"/g, '') + '"').join('');
}
var find = function(needle, sourceAsString, source) {
var rx = new RegExp('"(\\d+) ([^"]*' + needle + '[^"]*)"','gi');
var i = 0, results = [];
while (result = rx.exec(sourceAsString)) {
results.push(result[1]);
if (results.length >= 100) {
#!/bin/bash
git fetch -p
CURRENT=`git rev-parse --abbrev-ref HEAD`
if [ "$CURRENT" != "master" ]; then
git checkout master
fi
Sie können immer montags bis freitags von 20 bis 3 Uhr des Folgetages sowie samstags, sonntags, am 24. und 31. Dezember sowie feiertags ganztägig einen Erwachsenen kostenlos mitnehmen.
// https://bsaber.com/songs/top/page/2/?time=3-months&difficulty=expert-plus&ranked=false#038;difficulty=expert-plus&ranked=false
function getTitle(node) {
let artist = node.querySelector('.mapper_id').innerText;
let song = node.querySelector('.entry-title').innerText;
return `${artist} (${song})`.replace(/[^().-_a-z0-9[\] ]+/ig, '');
}
function getFile(node) {
import {combineLatest, ObservableInput, OperatorFunction} from 'rxjs';
import {map, mergeMap, take} from 'rxjs/operators';
// if you need some extra values from other observables - preferably synchronous like ngrx state
//
// Example:
// this.action.pipe(
// ofType(myActionType),
// tap((myActionType) => {}), // <-- only has the action value
// mergeTakeOne(this.store.select(myStoreValue), /* andAnotherObservable$, andEvenMoreObservables$ */),
import {Action, ActionCreator} from '@ngrx/store';
import {AbstractType, InjectionToken, Type} from '@angular/core';
import {Observable} from 'rxjs';
declare type DispatchType<T> = T extends {
dispatch: infer U;
}
? U
: true;
declare type ObservableType<T, OriginalType> = T extends false ? OriginalType : Action;
import {Directive, ElementRef, Input} from '@angular/core';
import {Observable, Subscription, of} from 'rxjs';
import {share} from 'rxjs/operators';
/**
* Adds the css class `active-animate` to the element, if given expression is truthy, but after a setTimeout without triggering change detection
* This allows to animate an element entering the view, as you can't have an animation on an element that was just added to the DOM
*
* Example:
*