Skip to content

Instantly share code, notes, and snippets.

Artem tyomo4ka

Block or report user

Report or block tyomo4ka

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
tyomo4ka / postman-prerequest-tyk-hmac.js
Last active Mar 13, 2019
Requests signing using HMAC authentication with TYK Gateway
View postman-prerequest-tyk-hmac.js
# An example of adding requests signature using HMAC authentication with TYK Gateway.
var sdk = require('postman-collection'),
apiKey = environment.api_key,
apiSecret = environment.api_secret,
date = (new Date()).toUTCString(),
signatureContentString = 'date: ' + date,
signatureString = CryptoJS.HmacSHA1(signatureContentString, apiSecret).toString(CryptoJS.enc.Base64),
authHeader = 'Signature keyId="' + apiKey + '",algorithm="hmac-sha1",signature="' + encodeURIComponent(signatureString) + '"';
View test.js
(function() {
setTimeout(function(){console.log(2)}, 1000);
setTimeout(function(){console.log(3)}, 0);
tyomo4ka /
Last active Jul 16, 2019 — forked from mwhite/
The Ultimate Git Alias Setup on OS X (brew)

The Ultimate Git Alias Setup on OS X (brew)

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bash_profile
View buttons.js
for (var i = 0; i < 5; i++) {
var btn = document.createElement('button');
btn.appendChild(document.createTextNode('Button ' + i));
btn.addEventListener('click', function(){ console.log(i); });
tyomo4ka / bs-labels-css-truncate.css
Created Feb 15, 2014
GitHubs like behavior for Twitter Bootstrap labels.
View bs-labels-css-truncate.css
span.label.css-truncate {
max-width: 80px;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
line-height: 1;
padding: 2px 3px;
height: 11px;
tyomo4ka / lt_ie_8.js
Created Feb 1, 2014
Approach to run IE specific code when you can not edit HTML code on page directly.
View lt_ie_8.js
var lt_ie_8 = function () {
var div = document.createElement("div");
div.innerHTML = "<!--[if lt IE 8]>]><i></i><![endif]-->";
if (div.getElementsByTagName("i").length) {
return true;
return false;
You can’t perform that action at this time.