Skip to content

Instantly share code, notes, and snippets.

window.helicopterView = (function(){
const CONTAINER_CLS = 'stats';
const HEADER_CLS = 'ghx-heading';
const SUBNAV_CLS = 'subnav-container';
function getColIssues(col, status) {
return Array.from(col.children).reduce((acc, issue) => {
const [spEl, componentsEl, labelsEl] = $(issue).find('.ghx-extra-fields').children();
const sp = Number(spEl.innerText.replace(/,/g, '.'));
const process = require('process');
const axios = require("axios");
const HOST = "https://api.todoist.com";
const TOKEN = process.env.TODOIST_TOKEN;
const DURATION_LABEL_NAME_PATTERN = /^\d+[мч]+$/;
const MINUTE_DURATION_LABEL_NAME_PATTERN = /м$/;
const OBITER_LABEL_NAME_PATTERN = /Попутно/;
const MIN_TASK_DURATION_MINUTES = 5;
@kerbyfc
kerbyfc / flow_vs_ts.md
Created July 11, 2018 20:17
Flow VS Typescript

// Flow 0.76 // Typescript

Online playground support:

  • Flow - poor, only by official playground, can't share code
  • Typescript - great

IDE support:

  • Flow - poor, laggy, memory leaks, stuns
  • Typescript - great
@kerbyfc
kerbyfc / makeOrder.js
Last active February 9, 2018 07:00
На случай если забыл заказать себе обед на портале
/**
* INSTALLATION
* 1. Install node (https://nodejs.org/en/download/package-manager or https://github.com/creationix/nvm#installation)
* 2. $ cd ~/ && mkdir -p makeOrder && npm init -y && npm install moment git+https://github.com/GoogleChrome/puppeteer#ddc59b247282774ccc53e3cc925efc30d4e25675
* 3. $ wget --no-check-certificate https://gist.githubusercontent.com/kerbyfc/9b4e79d5a7ac4a2ad0b839fca2e0581b/raw/1d3d23b4130a86d3fb2dbdf0b046db152e445c78/makeOrder.js
* 5. $ crontab -e # add line 20 13 * * * node ~/makeOrder.js | tee ~/makeOrder.log'
* 4. edit 'credentials' and 'products' variables in makeOrder script
*/
const puppeteer = require('puppeteer');
const moment = require('moment');
function Futures(executor) {
const self = this;
let fullfilled = false;
let pending = true;
let rejected = false;
let data;
const callbacks = {
function gre () {
git fetch
if [ "$1" != "" ]
then
echo "Reset to origin/\e[34m$1\e[0m"
git reset --hard origin/$1
else
echo "Reset to origin/\e[34m$(git rev-parse --abbrev-ref HEAD)\e[0m"
git reset --hard origin/$(git rev-parse --abbrev-ref HEAD)
fi
@kerbyfc
kerbyfc / pipelines-to-merqe-request.js
Created September 5, 2017 10:06
Gitlab custom script to navigate into pull-request from pipelines page
const projectIds = {
'frontend-react': 315,
'frontend': 147,
'appliance-face': 353
}
const projectName = /main\/([^\/]+)/.exec(location.pathname);
if (projectName) {
const projectId = projectIds[projectName[1]];
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
JavaScript 251 5602 5943 27592
TypeScript 620 2902 962 18042
HTML 204 2445 67 12313
XML 23 0 0 2601
Stylus 51 426 44 2170
JSON 25 1 0 1053
JSX 4 0 0 1049
.boards-app > div {
display: flex !important;
}
.board {
margin: 0 0 0 0 !important;
padding: 0 !important;
}
.board-list-component > .board-list {
@kerbyfc
kerbyfc / 50x.patch
Created October 28, 2016 15:56
branch feature/ABR-68976. Apply it from root
diff --git a/assets/errors/50x.html b/assets/errors/50x.html
index 4468f58..c931df6 100644
--- a/assets/errors/50x.html
+++ b/assets/errors/50x.html
@@ -40,16 +40,26 @@
<script type="text/javascript">
var offline;
+
+ /**