This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
go build -o terraform-provider-telegram && cp terraform-provider-telegram ~/.terraform.d/plugins/lonelyelk.ru/aws/telegram/1.0.0/darwin_amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = "stttartuuuup" | |
def compress(str) | |
complex_object = str.chars.each_with_object({result: ""}) do |char, obj| | |
if obj[:current] == char | |
obj[:count] += 1 | |
next | |
elsif obj[:current] | |
obj[:result] += "#{obj[:count]}x#{obj[:current]}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 2048 -f jwtRS256.key | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cnt=${2:-3} | |
to=${3:-1} | |
rcvd=$(set -o pipefail; timeout $to ping -A -s16 -c$cnt -q $1 2> /dev/null | grep received | awk -F', ' '{print $2}' | awk '{print $1}') | |
if [[ $? != 0 || $cnt != $rcvd ]]; then | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is modified version of Jasmine.js ConsoleReporter | |
*/ | |
module.exports = exports = ElkReporter; | |
function Timer(options) { | |
options = options || {}; | |
var now = options.now || (function (Date) { return function () { return new Date().getTime(); }; })(Date), | |
startTime; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v2 | |
mQINBFRU19UBEAD8+079s2G8XT5Gn2kRL1IZ9pqAJyeirBiz2CvragL/XmuAGhS0 | |
7QIpPO8DNiXkDSjNYImPM56/qz/lyhTgirCRtWopEuH62LIqa2DDp1+B3WDp00OO | |
vbPSDvSJo/uVRxOF28QC4LmSXLUJeCa4B+RnQHvRfkNhKB9ridnBRVmlmxN3Hvki | |
OF0Vb6qRI+0ga6owX3+xxHiBLU6+RRWyy7cbx5p3meVii+xaAuc+1OLCQr4urPBg | |
nMEAkWeQFA4LAdDkX1qH0O19n621wXPTwfy9L0Q4vaPHA1GC/fw/QlGEAxaXtDu3 | |
dwpRJ7N7btPth8fa6fSv9AKXJeQDV4xYLPWyX7Orz7Zfu55vKQ7uY00czqe4UnLu | |
fnL+RA0uZbgLdDrTDUxOXLnvuiANhY4PCCGXR5XWMRSoFcyWZQPQTQcFCojZixp2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name fbBefriended | |
// @description Remove friending notifocations from list feed | |
// @author Sergey Kruk | |
// @license MIT | |
// @version 0.0.4 | |
// @match https://www.facebook.com/lists/* | |
// ==/UserScript== | |
(function (window, undefined) { | |
var main = window.document.getElementById("stream_pagelet"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = "abc" | |
s.class == String # => true | |
s.class === String # => false | |
String === s.class # => false | |
s === String # => false | |
String === s # => true |