Skip to content

Instantly share code, notes, and snippets.

Alexey alexey-sh

  • Hue-Mue Ltd.
  • Russia, Omsk
Block or report user

Report or block alexey-sh

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
@alexey-sh
alexey-sh / sign.js
Created Aug 14, 2019 — forked from nolim1t/sign.js
node.js HMAC SHA512 signing
View sign.js
var crypto = require("crypto");
function encrypt(key, str) {
var hmac = crypto.createHmac("sha512", key);
var signed = hmac.update(new Buffer(str, 'utf-8')).digest("base64");
return signed
}
View keybase.md

Keybase proof

I hereby claim:

  • I am alexey-sh on github.
  • I am alexey_sh (https://keybase.io/alexey_sh) on keybase.
  • I have a public key whose fingerprint is A7C9 B125 F774 C05B 84B6 673F 67F0 9AA8 B464 8F00

To claim this, I am signing this object:

@alexey-sh
alexey-sh / main.css
Last active Apr 28, 2017
style vk audio page
View main.css
.ui_tabs_box .ui_tab, .ui_tabs_box .ui_tab_sel, .ui_tabs_header .ui_tab, .ui_tabs_header .ui_tab_plain, .ui_tabs_header .ui_tab_sel, .ui_tabs_sub_header .ui_tab, .ui_tabs_sub_header .ui_tab_plain, .ui_tabs_sub_header .ui_tab_sel {
padding: 12px 3px 12px!important;
line-height: 14px!important;
height: 22px!important;
}
.ui_tabs_box .ui_tab:hover, .ui_tabs_box .ui_tab_sel, .ui_tabs_header .ui_tab:hover, .ui_tabs_header .ui_tab_sel, .ui_tabs_sub_header .ui_tab:hover, .ui_tabs_sub_header .ui_tab_sel {
padding-bottom: 0!important;
}
.audio_page_layout .audio_page__main_tabs_btn {
margin: 0!important;
@alexey-sh
alexey-sh / main.js
Created Mar 5, 2017
harlem shake maker
View main.js
javascript:(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}funct
@alexey-sh
alexey-sh / drom.js
Created Oct 27, 2016
Find median price on drom ru
View drom.js
function median (values) {
values.sort(function (a, b) {
return a - b;
});
var half = Math.floor(values.length / 2);
if (values.length % 2)
return values[half];
else
return (values[half - 1] + values[half]) / 2.0;
}
View mixins.scss
@mixin box-shadow($value) {
-webkit-box-shadow: $value;
-moz-box-shadow: $value;
box-shadow: $value;
}
@alexey-sh
alexey-sh / main.js
Created Mar 3, 2016
alfabank currencies
View main.js
function loadScript () {
return $.getScript('https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.js');
}
function loadData () {
return $.getJSON('https://alfabank.ru/ext-json/0.2/exchange/cash/?offset=0&limit=20').then(function (d) { return d.response.data.usd.filter(function (x) {return x.type==='buy'}); });
}
function drawChart () {
$.when(loadData(), loadScript()).then(function (currencies) {
@alexey-sh
alexey-sh / finish
Last active Aug 29, 2015
all is clear for me now
View finish
orders_list_app.constant('User', {
auth : ('False' == 'True') ? true : false,
contractor : ('' == 'True') ? true : false,
user_id : ('False' == 'True') ? None : false
});
View how people do it
usualIQ = 120
workingHoursPerDay = 6
getWorkingDaysInMonth = (date) ->
isWorkingDate = (date) ->
day = date.getDay()
return day isnt 0 and day isnt 6
daysInMonth = new Date(date)
daysInMonth.setMonth(daysInMonth.getMonth() + 1)
daysInMonth.setDate(0)
@alexey-sh
alexey-sh / init
Last active Aug 29, 2015
awesome salary features
View init
var awesomeScripts = [
'https://cdn.rawgit.com/alexey-sh/c4ced1e023e037298f1a/raw/86e493d5607c81bc2bab7c51cbd9ae8bb7f238ef/gistfile1.js',
'https://cdn.rawgit.com/alexey-sh/c4ced1e023e037298f1a/raw/3c2af38c2a0acadf94a032c506b7292c390468c7/gistfile1.js'
];
awesomeScripts.forEach(function (src) {
$('body').append($('<script>').attr('src', src));
});
You can’t perform that action at this time.