Skip to content

Instantly share code, notes, and snippets.

@pongo
pongo / fuse.js
Created July 17, 2017 10:36
Билдим стили при помощи FuseBox
const {
FuseBox,
CSSPlugin,
} = require('fuse-box');
const fuse = FuseBox.init({
homeDir: 'styles',
output: 'build/$name.js',
plugins: [
["*.css", CSSPlugin({
#! /usr/bin/env python
"""Script to inspect memcache.
Usage:
python scripts/2011/08/inspect-memcache.py localhost:7060
"""
import sys
import memcache
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@pongo
pongo / .md
Created August 6, 2016 09:39
Проблемы с обновлением Защитника в Windows 10

Проблемы с обновлением Защитника в Windows 10

Запуск обновления через консоль

"%programfiles%\windows defender\mpcmdrun.exe" -signatureupdate -http

Логи

  • C:\Windows\Temp\MpSigStub.log
  • C:\Windows\Temp\MpCmdRun.log
@pongo
pongo / Javascript EventEmitters benchmark.md
Last active January 27, 2023 16:28
EventEmitter javascript libraries benchmark -- sorted by ops/sec
Library Input Output Gzip Stars 1 emit (ops/sec) many ons and emits ↓
chrisdavies/eev 2.02 KB 1.00 KB 457 b 166 9 722 398 362 175
alexanderGugel/micro-events 3.55 KB 1.53 KB 611 b 20 8 313 328 268 100
primus/eventemitter3 8.50 KB 3.24 KB 993 b 1010 36 762 683 266 752
riot/riot 8 045 274 147 673
Nicolab/evemit 4.18 KB 1.16 KB 494 b 15 3 634 852 139 524
Gozala/events 8.33 KB 3.94 KB 1.17 KB 378 48 177 783 130 989
developit/mitt 1.47 KB 304 (465) B
@pongo
pongo / index.html
Last active November 24, 2015 18:37
jquery 1.7.2 migrate test
<head>
<script type="text/javascript" src="https://yandex.st/jquery/1.7.2/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-migrate-1.2.1.js"></script>
</head>
@pongo
pongo / index.html
Last active November 3, 2015 17:31
YouTube Image Extractor Bookmarklet - html preview http://bit.ly/1HpbGjr
<p><a href="javascript:void(function(){var%20a=document.getElementsByTagName('link');for(i=a.length-1;i>=0;i--){if(a[i].getAttribute('itemprop')=='thumbnailUrl'){open(a[i].getAttribute('href'));break;}}})();">YTimage</a></p>
<p>Перетащите <a href="javascript:void(function(){var%20a=document.getElementsByTagName('link');for(i=a.length-1;i>=0;i--){if(a[i].getAttribute('itemprop')=='thumbnailUrl'){open(a[i].getAttribute('href'));break;}}})();">YTimage</a> на панель закладок браузера. Далее откройте видео на ютубе и нажмите YTimage (на панели закладок). В новом окне откроется картинка с эскизом этого видео.</p>
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("js2.coffee") {
.code-box:not(.focus) .CodeMirror, .code-box-popup:not(.focus) .CodeMirror {
opacity: 1 !important;
}
/* Based on Sublime Text's Monokai theme */
@pongo
pongo / gist:b50259ed6420f2cdabf8
Created March 12, 2015 22:48
How to create a simple --JavaScript-- CoffeeScript library in jQuery style. Based on http://bjarneo.codes/how-to-create-a-simple-javascript-library-like-jquery/
# Anonymous function
do ->
# Q returns new Library object that hold our selector. Ex: Q('.wrapper')
Q = (params) ->
new Library(params)
# In our Library we get our selector with querySelectorAll (we do not support < ie8)
# We also add selector length, version and twitter/github or whatever you like as information about your library.
Library = (params) ->
# Get params
@pongo
pongo / gist:2939935067cfd5ddff75
Last active August 18, 2022 08:15
Пример реализации очереди
// noprotect
var width = 320;
function taskQueue(capacity) {
var running = 0;
var queue = [];
function release() {
if (queue.length) {