Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
mkdir -p ~/.bin;
curl https://raw.githubusercontent.com/pmyagkov/dotfiles/master/.bin/create-tag > ~/.bin/create-tag;
chmod +x ~/.bin/create-tag;
if [[ $PATH == *":~/.bin"* ]]; then
echo "No need to patch rc config"
exit
function setIsAnimating (node, isAnimating) {
console.log(`isAnimating: ${ isAnimating }`, node)
node.isAnimating = isAnimating
}
function init (selector) {
const node = document.querySelector(selector)
if (!node) {
return false
}
require('colors')
const fs = require('fs')
const _ = require('lodash')
const RATIO = 16 / 11 // `new rem / old rem`
const filePath = process.argv[2]
console.log(`Processing`, filePath.red)
@pmyagkov
pmyagkov / index.js
Last active July 20, 2017 14:15
JIRA estimates log
// assume JIRA has lodash embedded
// can't use class because of a redeclare issue
function Issue (issueNode, sectionName) {
const PRIORITY_SELECTOR = '.ghx-priority'
const TITLE_SELECTOR = '.ghx-summary .ghx-inner'
const ORIGINAL_ESTIMATE_SELECTOR = '.ghx-statistic-badge'
const REMAINING_ESTIMATE_SELECTOR = `.ghx-plan-extra-fields .ghx-extra-field-content`
this._sprint = sectionName
@pmyagkov
pmyagkov / books.js
Created May 21, 2017 14:44
[HJ-2.3] Denis Blinkov
document.addEventListener('DOMContentLoaded',ready);
//===============
//Объявляем переменные,которые прослеживаются во всем коде
let arrayObj;
let blockContent;
let xhr;
//============
function ready() {
xhr = new XMLHttpRequest();
blockContent = document.querySelector('#content');
import * as React from 'react'
import * as debounce from 'lodash/debounce'
import { Context } from 'interfaces/global'
import { AnchorPlacement } from 'interfaces/navigation'
type AnchorProps = AnchorOwnProps & AnchorStateProps & AnchorDispatchProps
class Anchor extends React.Component<AnchorProps, Context> {
private scrollIsBlocked: boolean = true
import { createStore, applyMiddleware, compose } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from 'app/reducers'
import { userAuthenticateSaga } from 'app/sagas/userSaga'
const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
const sagaMiddleware = createSagaMiddleware()
import React from 'react'
export default <Root />
@pmyagkov
pmyagkov / dabblet.css
Created December 17, 2013 20:53
Untitled
.a {
width: 100px;
height: 100px;
background: purple;
border-radius: 3px;
border: 1px solid;
opacity: 0;
transition: opacity 0.5s ease-out 0s;
@pmyagkov
pmyagkov / dabblet.css
Created December 17, 2013 20:46
Untitled
.switch-container {
display: inline-block;
height: 50px;
width: 25px;
position: relative;
border-radius: 3px;
border: 1px silver solid;
background: #E9ECF1;