Execute scripts/patch/patch-jscodeshift.js
.
It will monkey-patch node_modules/jscodeshift/parser/babel5compat.js
by prepending 'decorators-legacy'
to the plugins array.
This file contains hidden or 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
// ---- | |
// libsass (v3.5.4) | |
// ---- | |
@mixin spacing-helpers( | |
$style, | |
$sizes: (0, 5, 10, 15, 20, 25, 30, 50), | |
$positions: ('', 'top', 'left', 'bottom', 'right') | |
) { | |
@each $size in $sizes { |
This file contains hidden or 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
dockerized-ubuntu() { dockerized ubuntu ubuntu:latest /bin/bash bash } | |
dockerized-curl() { dockerized curl pstauffer/curl:latest /bin/sh sh } | |
# based on https://stackoverflow.com/a/56690087/368254 | |
dockerized() | |
{ | |
name=$1 | |
image=$2 | |
containercmd=$3 | |
runcmd=$4 |
This file contains hidden or 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
(function getGitlabSecrets() { | |
const secrets = [ | |
...document.querySelectorAll('.ci-variable-row-body'), | |
].reduce((result, row) => { | |
const key = row.querySelector( | |
'[name="variables[variables_attributes][][key]"]', | |
).value; | |
const value = row.querySelector( | |
'[name="variables[variables_attributes][][secret_value]"]', | |
).value; |
This file contains hidden or 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
export function renameObjKeys(obj, mapping) { | |
// based on https://stackoverflow.com/a/48110891/368254 | |
const renameObjKey = (obj, { oldKey, newKey }) => { | |
const keys = Object.keys(obj); | |
const newObj = keys.reduce((acc, val) => { | |
if (val === oldKey) { | |
acc[newKey] = obj[oldKey]; | |
} else { | |
acc[val] = obj[val]; | |
} |
This file contains hidden or 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
module.exports = async function getDevDependencies(globs = ['package.json', 'packages/*/*.json']) { | |
const globby = require('globby'); | |
const packageFiles = await globby(globs, { absolute: true }); | |
return packageFiles.reduce((result, file) => { | |
const pkg = require(file); | |
if (pkg.devDependencies) { | |
const names = Object.keys(pkg.devDependencies); | |
return result.concat(names.filter(name => !result.includes(name))); | |
} |
This file contains hidden or 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
kill() { | |
local name="${1}" | |
if [ -z "$name" ]; | |
then | |
echo ">> Enter a process name and press [ENTER] (partial matching)" | |
read name | |
fi | |
wmic process where "name like '%$name%'" delete | |
} |
This file contains hidden or 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
// orientdb/adapter.js | |
import connect from './connect'; | |
import autobind from 'autobind-decorator'; | |
import applySchema from './applySchema'; | |
import createBaseData from './createBaseData'; | |
const EventEmitter = require('events'); | |
This file contains hidden or 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
import * as spauth from 'node-sp-auth'; | |
import getBaseUrl from '../utils/getBaseUrl'; | |
export const AuthMethod = { | |
NONE: 'NONE', | |
NTLM: 'NTLM', | |
BASIC: 'BASIC' | |
}; |
This file contains hidden or 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
// we have an async "initialize" method that performs several calls consecutively. | |
// after each step in the async chain, we might have been unmounted already | |
// and performing any further calls becomes obsolete | |
class DefaultComponent extends React.Component { | |
// ... | |
componentDidMount() { | |
this._isMounted = true; | |
this.initialize(); | |
} | |
componentWillUnmount() { |