Skip to content

Instantly share code, notes, and snippets.

Alex Buznik beshur

Block or report user

Report or block beshur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@beshur
beshur / canvas.js
Created Sep 13, 2019
Multiple covers on canvas
View canvas.js
// image width and height
var iw = 132;
var imageCounter = 0;
var x = 0;
var y = 0;
var ctx = document.getElemenyById('c').getContext('2d');
ctx.fillStyle = "white";
ctx.fillRect(0, 0, 800, 1100);
View compareFromCommit-TamperMonkey.js
// ==UserScript==
// @name compareFromCommit
// @namespace http://buznik.net/
// @version 0.1.1
// @description The script inserts a link to compare commits from the current commit in Github pull-request
// @author Alex Buznik
// @include /https:\/\/github.com\/(.*[^/])\/(.*[^/])\/pull\/(.*)/
// @downloadURL https://gist.githubusercontent.com/beshur/e1398ff5e741308cd29476f75d612bdd/raw/compareFromCommit-TamperMonkey.js
// @grant none
// ==/UserScript==
View piece RequestRepeater.test.js
describe('RequestRepeater functions', function() {
it('should make request and repeat it at least once', function(done) {
const requestRepeater = new RequestRepeater({
request: MOCK_REQUEST,
delay: 1000
})
let times = 0;
requestRepeater.requestAndRepeat()
requestRepeater.on('result', (result, error) => {
@beshur
beshur / userscripts.js
Last active Nov 15, 2018
[Tampermonkey] Quora Links Remover
View userscripts.js
// ==UserScript==
// @name Quora Links Remover
// @namespace http://tampermonkey.net/
// @version 0.1.1
// @description try to read Quora again!
// @author Alex Buznik
// @match https://www.quora.com/
// @grant none
// ==/UserScript==
@beshur
beshur / Gruntfile.js
Last active Apr 20, 2018
Chrome Extension Grunt Build Script
View Gruntfile.js
// Task configurations
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('manifest.json'),
bumpup: {
options: {
updateProps: {
pkg: 'manifest.json'
}
},
@beshur
beshur / convert.sh
Created Apr 3, 2018 — forked from akost/convert.sh
Bash script for recursive file convertion windows-1251 --> utf-8
View convert.sh
#!/bin/bash
# Recursive file convertion windows-1251 --> utf-8
# Place this file in the root of your site, add execute permission and run
# Converts *.php, *.html, *.css, *.js files.
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f |
while read file
do
View twirlTimer.css
.block {
text-align: center;
}
.spinner {
padding: 15px 0;
display: inline-block;
font-size: 30px;
font-weight: bold;
}
@beshur
beshur / пше
Created Jun 27, 2016 — forked from piranha/пше
пше гит, прошу пана
View пше
#!/usr/bin/env python
# -*- mode: python, coding: utf-8 -*-
#
# This incredible piece of code makes git a bit Polish, a bit Western Ukrainian,
# пше прошу пана
# Joke is based on fact that 'git' is 'пше' in qwerty/йцукен layouts
#
# (c) 2013 Alexander Solovyov under terms of WTFPL
import sys
@beshur
beshur / test.js
Last active May 20, 2016
simple memory test
View test.js
// simple memory test
var memoryTest = function() {
function clickTest() {
var test = 'clickTest ' + iteration;
if (this.timing) {
console.time(test);
} else {
console.info(test);
}
$(".plugintab label").each(function(i, el){$(el).find("span:first").click();})
@beshur
beshur / log.js
Created Mar 18, 2016
js Log wrapper and config for winston
View log.js
/**
* Log wrapper and config
*
* @return module
*/
var winston = require('winston');
function getLogger(module) {
return new winston.Logger({
transports : [
You can’t perform that action at this time.