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 { Uri } from 'vscode' | |
import * as vscode from 'vscode' | |
import fetch from 'node-fetch' | |
export function activate(context: vscode.ExtensionContext) { | |
const installPrivateVersionOfExtension = () => { | |
const fileBlob = await ( | |
// Most likely you want to authenticate user to execute that request | |
await fetch('https://your.server.com/extension.vsix') | |
).blob() |
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
CONSOLE_LOGS="$(git diff HEAD | grep -e '^\+.*console.log' -ie '^\+.*todo')" | |
if [ ${#CONSOLE_LOGS} -ge 1 ] ; then | |
printf "😮 console.logs or todos found in commit diff!\n\n" | |
printf "$CONSOLE_LOGS\n\n" | |
echo '🛑 terminating' | |
exit 1 | |
fi |
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
#!/bin/sh | |
MSG_FILE="$1" | |
echo "🔄 Validating message: $(cat $MSG_FILE | grep --invert-match '#')" | |
cspell "$MSG_FILE" | |
# cspell should be installed -> yarn global add cspell | |
# save this file in .git/hooks/commit-msg |
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
{ | |
"rules" : { | |
"padding-line-between-statements": [ | |
"error", | |
{ "blankLine": "always", "prev": "block-like", "next": "*" }, // padding after code block | |
{ "blankLine": "always", "prev": "*", "next": "return" }, // padding before return | |
{ "blankLine": "always", "prev": "*", "next": "if" }, // padding before if statement | |
{ "blankLine": "always", "prev": "*", "next": "for" }, // padding before for loop | |
{ "blankLine": "always", "prev": "*", "next": "function" }, // padding before function | |
{ "blankLine": "always", "prev": "*", "next": "export" }, // padding before export |
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
const cp = require('child_process') | |
const results = [] | |
for (let i = 0; i < 10; i++) { | |
const result = cp.execSync('yarn --cwd app build') | |
const resultString = result.toString() | |
const timeMatch = resultString.match(/\d\d\.\d\ds\./) | |
if (timeMatch === null) { | |
throw new Error('missing time result') | |
} |
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 = { | |
presets: [ | |
'babel-preset-gatsby', | |
[ | |
'linaria/babel', | |
{ | |
evaluate: true, | |
displayName: process.env.NODE_ENV !== 'production' | |
} | |
], |
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
var labels = []; | |
[].slice.call(document.querySelectorAll(".js-label-link")) | |
.forEach(function (element) { | |
labels.push({ | |
name: element.textContent.trim(), | |
description: element.getAttribute("title") || "", | |
// using style.backgroundColor might returns "rgb(...)" | |
colour: element.getAttribute("style") | |
.replace("background-color:", "") | |
.replace(/color:.*/, "") |
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
docker-compose up -d --no-deps --build |
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
# change $NUMBER to number of emulator from list (emulator -list-avds) | |
emulator @$(emulator -list-avds | tr "\n" "," | cut -d ',' -f $NUMBER) > /dev/null 2>&1& |