Skip to content

Instantly share code, notes, and snippets.

View moondef's full-sized avatar
:octocat:

Stepan Samko moondef

:octocat:
View GitHub Profile

Keybase proof

I hereby claim:

  • I am moondef on github.
  • I am moondef (https://keybase.io/moondef) on keybase.
  • I have a public key ASAW9bhoDdIss5QcCGAWNrmJ0v9Ymhmndj9ZeClLIXMlRQo

To claim this, I am signing this object:

const balancedNum = number => {
const str = number.toString();
const getMiddle = s => {
const splited = s.split('');
if (splited.length % 2 === 0) {
return splited[splited.length / 2 - 1] + splited[splited.length / 2];
} else {
return splited[Math.floor(splited.length / 2)];
}
@moondef
moondef / getAngle.js
Last active June 22, 2018 13:06
Get angle between arrows
const getAngle = (hour, min) => Math.abs(30 * ((hour % 12) + min / 60) - min * 6);
@moondef
moondef / .gitattributes
Created March 30, 2018 17:48
Gist for setting language
*.html linguist-language=JavaScript