Skip to content

Instantly share code, notes, and snippets.

View AlexanderTserkovniy's full-sized avatar
😄

AlexanderTserkovniy AlexanderTserkovniy

😄
View GitHub Profile
@AlexanderTserkovniy
AlexanderTserkovniy / Bookmarklet
Last active August 29, 2015 14:25
Google inbox select all items
javascript:+function(){var all = document.querySelectorAll('.J.itemCheckboxOff');all = Array.prototype.slice.call(all);all.forEach(function (span) {span.click();});}();
javascript: (function (log) {var name = jQuery('.ghx-issue-compact.ghx-selected .js-key-link, .ghx-issue.ghx-selected .js-key-link, .ghx-swimlane-header.ghx-selected .js-detailview').text(); var description = jQuery('.ghx-issue.ghx-selected .ghx-inner, .ghx-issue-compact.ghx-selected .ghx-inner').text(); var description = description || jQuery('.ghx-swimlane-header.ghx-selected .ghx-summary').contents().filter(function() {return this.nodeType === 3; }).text(); var transformed = {name: name.trim().toLowerCase(), description: description.trim().toLowerCase().replace(/[,\.\-\&'"]/g, '') }; var result = [transformed.name + '-' + transformed.description.split(' ').join('-'), name + ' ' + description ]; log(['git checkout -b ' + result[0] ].concat(result)); })(console.log.bind(console));
@AlexanderTserkovniy
AlexanderTserkovniy / index.js
Last active November 3, 2017 23:30
Limit promise requests.
/**
* Created by Oleksandr Tserkovnyi on 11/3/17.
* kemperomg@gmail.com
*/
const assert = require('assert');
const requester = strToRequest => {
return new Promise((res, rej) => {
const plus = Math.random() * 2000;
@AlexanderTserkovniy
AlexanderTserkovniy / notes.md
Created September 17, 2019 11:56 — forked from scabbiaza/notes.md
Quality Attributes for JS Frontend Application
@AlexanderTserkovniy
AlexanderTserkovniy / main2.sol
Last active September 29, 2021 20:28
Example tokens from the official web site 0x8F228268423D5c535A5b316d0f84a6A2D84f242E and 0xf347712bc3cDBF1464C902B6C00111d998f615BF
pragma solidity ^0.6.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);