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
import { store, type RootState } from '@/store' | |
import { mapValues } from 'lodash' | |
import { computed, getCurrentInstance, type ComputedRef } from 'vue' | |
import type { ActionTree, GetterTree, MutationTree, Store } from 'vuex' | |
type GetRestParams<T extends (a: any, ...args: any) => any> = T extends ( | |
a: any, | |
...args: infer P | |
) => any | |
? P |
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
enum CrawleraError { | |
banned = 'banned', | |
noslaves = 'noslaves', | |
bad_session_id = 'bad_session_id', | |
user_session_limit = 'user_session_limit', | |
invalid_request = 'invalid_request', | |
bad_uri = 'bad_uri', | |
user_suspended = 'user_suspended', | |
bad_proxy_auth = 'bad_proxy_auth', |
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
/** | |
* Simple ES6 Throttle implementation with arguments and context | |
* | |
* @param callback {Function} - Function to throttle | |
* @param [limit=30] {number} - Ms to throttle | |
* @param [context=this] - Context to run in | |
* @return {Function} | |
*/ | |
const throttle = ( callback, limit = 30, context = this ) => { | |
let |
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
// # npm i --save-dev gulp gulp-sass gulp-sourcemaps gulp-babel babel-preset-es2015 browser-sync gulp-autoprefixer | |
'use strict'; | |
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
sourcemaps = require('gulp-sourcemaps'), | |
babel = require('gulp-babel'), | |
browserSync = require('browser-sync').create(), | |
autoprefixer = require('gulp-autoprefixer'); |
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
var lines = []; | |
function Line(x, y, toX, toY, width, color) { | |
this.x = x; | |
this.y = y; | |
this.toX = toX; | |
this.toY = toY; | |
this.width = width; | |
this.color = color; | |
this.alpha = 1; |
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 | |
function isBodyClass($classToSearchFor) { | |
$classes = get_body_class(); | |
return in_array($classToSearchFor, $classes); | |
} | |
?> |