Skip to content

Instantly share code, notes, and snippets.

View qetr1ck-op's full-sized avatar
💫

Orest Prystayko qetr1ck-op

💫
View GitHub Profile
@harthur
harthur / snippet.md
Created June 18, 2012 22:12
console.log() key binding for Sublime Text

Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:

[
    { "keys": ["super+shift+l"],
      "command": "insert_snippet",
      "args": {
        "contents": "console.log(${1:}$SELECTION);${0}"
      }
 }
@netpoetica
netpoetica / assert.js
Created September 24, 2012 02:22
A visual and console implementation of a basic assert in JavaScript - assertions with a assertion panel in your browser window without intruding upon your other content.
/*
assert.js
by keith rosenberg / netpoetica
An assert function that will create a visual pane if browser is present. It will always
output to console as well. The styling is configured to be position-fixed to the top
right corner (hopefully in most situations, out of the way). I created this after viewing
http://net.tutsplus.com/tutorials/javascript-ajax/quick-tip-quick-and-easy-javascript-testing-with-assert/
@rxaviers
rxaviers / gist:7360908
Last active July 8, 2024 00:51
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@callumacrae
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript
@staltz
staltz / introrx.md
Last active July 6, 2024 17:07
The introduction to Reactive Programming you've been missing
@nikcorg
nikcorg / berlin-jsconf-2014.md
Last active August 4, 2023 12:45
Slide decks of JSConf 2014
@a0viedo
a0viedo / asyncQuiz.js
Last active January 26, 2021 19:54
Can you guess what the console will print? Extracted from the book Mastering Node.js
var fs = require('fs');
var EventEmitter = require('events').EventEmitter;
var pos = 0;
var messenger = new EventEmitter();
messenger.on('message', function(msg) { console.log(++pos + " message:" + msg);
});
console.log(++pos + " first");
@jkrems
jkrems / generators.md
Last active February 24, 2020 19:09
Generators Are Like Arrays

In all the discussions about ES6 one thing is bugging me. I'm picking one random comment here from this io.js issue but it's something that comes up over and over again:

There's sentiment from one group that Node should have full support for Promises. While at the same time another group wants generator syntax support (e.g. var f = yield fs.stat(...)).

People keep putting generators, callbacks, co, thunks, control flow libraries, and promises into one bucket. If you read that list and you think "well, they are all kind of doing the same thing", then this is to you.

@leonderijke
leonderijke / svgfixer.js
Last active June 17, 2024 07:57
Fixes references to inline SVG elements when the <base> tag is in use.
/**
* SVG Fixer
*
* Fixes references to inline SVG elements when the <base> tag is in use.
* Firefox won't display SVG icons referenced with
* `<svg><use xlink:href="#id-of-icon-def"></use></svg>` when the <base> tag is on the page.
*
* More info:
* - http://stackoverflow.com/a/18265336/796152
* - http://www.w3.org/TR/SVG/linking.html
@oharsta
oharsta / AngularNonLatin1
Created January 31, 2015 06:15
Angular Validate non latin-1 chars
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Form latin-1 input validation</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js"></script>
<script type="text/javascript">
(function(angular) {
'use strict';