This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compare https://github.com/ReactiveX/rxjs/issues/3015 | |
import { concat, delay, delayWhen, last, MonoTypeOperatorFunction, Observable, SchedulerLike, take, timer } from 'rxjs'; | |
const MAX_INT = 2147483647; | |
export const longDelay = | |
<T>(due: number | Date, scheduler?: SchedulerLike): MonoTypeOperatorFunction<T> => | |
(source: Observable<T>): Observable<T> => { | |
if (due <= MAX_INT) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compare https://github.com/ReactiveX/rxjs/issues/3015 | |
import { concat, last, Observable, repeat, scan, SchedulerLike, take, timer } from 'rxjs'; | |
import { map } from 'rxjs/operators'; | |
const MAX_INT = 2147483647; | |
const getTimer = (time: number, scheduler: SchedulerLike | undefined): Observable<0> => { | |
if (time > MAX_INT) { | |
const n: number = Math.floor(time / MAX_INT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.5.4) | |
// ---- | |
@function color-scale($base-color, $index) { | |
@if $index < -2 or $index > 9 { | |
@error "Index needs to be between -2 and 9"; | |
} | |
@if $base-color == $color-black or $base-color == $color-white { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function () { | |
return function () { | |
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function({n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','//connect.facebook.net/en_US/fbevents.js'); | |
} | |
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function () { | |
return function () { | |
var fbq = window.fbq; | |
if (!fbq) { | |
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function({n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','//connect.facebook.net/en_US/fbevents.js'); | |
fbq = window.fbq; | |
fbq('init', '...'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function () { | |
return function (url, callback) { | |
var doc = document, | |
el = doc.createElement('script'); | |
el.src = url; | |
el.async = 1; | |
if (callback) { | |
el.addEventListener('load', callback); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function () { | |
return function () { | |
var fbq = window.fbq; | |
if (!fbq) { | |
!function(f,b){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];}(window,document); | |
{{fn.load-script}}(‘//connect.facebook.net/en_US/fbevents.js’); | |
fbq = window.fbq; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function () { | |
return function () { | |
var win = window, | |
fbq = win.fbq; | |
if (!fbq) { | |
fbq = win.fbq = function() { | |
fbq.callMethod ? fbq.callMethod.apply(fbq, arguments) : fbq.queue.push(arguments) | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Wyrfel\Helper; | |
use Exception; | |
/** | |
* Callback helper | |
* | |
* This allows passing parameters to callbacks for php built-ins that take a callback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $user_identity; | |
//$user_submissions = get_posts(); | |
if ($user = wp_get_current_user()) { | |
$author = array('id' => $user->ID); | |
} else { | |
$commenter = wp_get_current_commenter(); | |
$author = array( | |
'author' => $commenter['comment_author'], |