Skip to content

Instantly share code, notes, and snippets.

View zoxon's full-sized avatar

Zoxon zoxon

View GitHub Profile
<template>
<component :is="tag" :class="classes" :style="style"><slot></slot></component>
</template>
<script>
import { isNumber } from '@/helpers/is'
import { stringToModifiers } from '@/helpers/bem'
export default {
name: 'BaseScrollbar',
@zoxon
zoxon / colorVars.css
Created September 25, 2020 04:52 — forked from softpunch/colorVars.css
CSS Variables For Color Manipulation
/* ----
css custom properties to manipulate color
MIT - 2017 - Soft Punch
https://gist.github.com/softpunch/
set initial "main" color via HSL values.
automatically calculate harmonies and variations of that color with pure css.
harmonies are determined solely by hue.
const scrollBarGap = window.innerWidth - document.documentElement.clientWidth

Очистка кеша браузера

Google Chrome, Chromium

Как отчистить кеш сервис воркера

  1. На странице нажать ПКМ и выбрать пункт «Просмотреть код»

Контекстное меню браузера

@zoxon
zoxon / html-time-datetime-cheatsheet.md
Created April 14, 2019 10:55
HTML <time> datetime Attribute cheatsheet

Dates:

<time datetime="1914">  <!-- means the year 1914 -->
<time datetime="1914-12">  <!-- means December 1914 -->
<time datetime="1914-12-20">  <!-- means 20 December 1914 -->
<time datetime="12-20">  <!-- means 20 December any year -->
<time datetime="1914-W15">  <!-- means week 15 of year 1914 -->

Date and Times:

youtube-dl

  1. Download playlist
$ youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" <url to playlist>
@zoxon
zoxon / App.vue
Created January 4, 2019 12:18 — forked from lmiller1990/App.vue
<template>
<div id="app">
<p>
Pending: {{ $store.state.getInfoPending }}
</p>
<p>
{{ $store.state.getInfoData }}
</p>
</div>
</template>
@zoxon
zoxon / serve.go
Created November 21, 2018 09:22 — forked from paulmach/serve.go
Simple Static File Server in Go
/*
Serve is a very simple static file server in go
Usage:
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
*/
package main
@zoxon
zoxon / pubsub.js
Created November 4, 2018 18:24 — forked from learncodeacademy/pubsub.js
Basic Javascript PubSub Pattern
//events - a super-basic Javascript (publish subscribe) pattern
var events = {
events: {},
on: function (eventName, fn) {
this.events[eventName] = this.events[eventName] || [];
this.events[eventName].push(fn);
},
off: function(eventName, fn) {
if (this.events[eventName]) {