Skip to content

Instantly share code, notes, and snippets.

Yefim Vedernikoff yefim

Block or report user

Report or block yefim

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
View main.dart
import 'dart:html';
void main() {
window.onMessage.listen((message) { print('1'); });
window.onMessage.listen((message) { print('2'); });
window.onMessage.listen((message) { print('3'); });
window.onMessage.listen((message) { print('4'); });
window.postMessage({'a': 'b'}, '*');
}
View main.dart
void main() async {
final t1 = () => Future.delayed(Duration(seconds: 1), () => true); // should short circuit
final t2 = () => Future.delayed(Duration(seconds: 3), () => true);
final t3 = () => Future.delayed(Duration(seconds: 2), () => false);
final timers = [t1, t2, t3];
bool isDirty = false;
print('Running');
View main.dart
void main() async {
final t1 = () => Future.delayed(Duration(seconds: 1), () => print('1'));
final t2 = () => Future.delayed(Duration(seconds: 3), () => print('3'));
final t3 = () => Future.delayed(Duration(seconds: 2), () => print('2'));
final timers = [t1, t2, t3];
print('Running');
Stopwatch stopwatch = new Stopwatch()..start();
View main.dart
void main() async {
final t1 = () => Future.delayed(Duration(seconds: 1), () => print('1'));
final t2 = () => Future.delayed(Duration(seconds: 3), () => print('3'));
final t3 = () => Future.delayed(Duration(seconds: 2), () => print('2'));
final timers = [t1, t2, t3];
print('Running');
Stopwatch stopwatch = new Stopwatch()..start();
View spelling-bee-solver.js
const wordListPath = require('word-list'); // https://github.com/sindresorhus/word-list
const readlines = require('gen-readlines'); // https://github.com/neurosnap/gen-readlines
const isSuperset = (set, subset) => {
for (const elem of subset) {
if (!set.has(elem)) {
return false;
}
}
return true;
View promise-or-callback.js
const promiseOrCallback = (cb) => {
if (cb) {
cb('callback');
} else {
return Promise.resolve('promise');
}
};
const main = async () => {
console.log(await promiseOrCallback());
@yefim
yefim / Stylefile.yml
Created Jul 27, 2018
Customizations for yef.im via StyleURL.
View Stylefile.yml
---
version: 1.0
domains:
- yef.im
url_patterns:
- yef.im/*
timestamp: '2018-07-27T06:23:43Z'
id: AsiK
redirect_url: https://yef.im/
shared_via: StyleURL – import and export CSS changes from Chrome Inspector to a Gist
@yefim
yefim / Stylefile.yml
Created Jul 27, 2018
Customizations for yef.im via StyleURL.
View Stylefile.yml
---
version: 1.0
domains:
- yef.im
url_patterns:
- yef.im/*
timestamp: '2018-07-27T06:22:31Z'
id: _miH
redirect_url: https://yef.im/
shared_via: StyleURL – import and export CSS changes from Chrome Inspector to a Gist
@yefim
yefim / Stylefile.yml
Created Jul 27, 2018 — forked from Jarred-Sumner/Stylefile.yml
Customizations for yef.im via StyleURL.
View Stylefile.yml
---
version: 1.0
domains:
- yef.im
url_patterns:
- yef.im/*
timestamp: '2018-07-27T04:42:45Z'
id: 1hhU
redirect_url: https://yef.im/
shared_via: StyleURL – import and export CSS changes from Chrome Inspector to a Gist
View verify.txt
Verifying my Blockstack ID is secured with the address 1Bo7ejqkATP6BUcv7WauFQdx4BUQBrLoX9 https://explorer.blockstack.org/address/1Bo7ejqkATP6BUcv7WauFQdx4BUQBrLoX9
You can’t perform that action at this time.