Skip to content

Instantly share code, notes, and snippets.

Constantine Genchevsky constgen

Block or report user

Report or block constgen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@constgen
constgen / README.md
Created Dec 25, 2018 — forked from bastienrobert/README.md
Script to open chrome with specific URL gived in params
View README.md

OpenChrome

Inspired by Create React App

This script is checking in every chrome window if there's a tab with the URL gived in params:

  • If there's one: It opens chrome in first-ground and show the good chrome window with the good tab
  • If there's multiples: Same behavior but it use the first tab found
  • If there's not: It launch chrome (if it's not open) and create a new tab with the given URL

Utilisation

osascript openChrome.scpt YOUR_FORMATTED_URL

View .gitignore
/.DS_Store
/package-lock.json
*.code-workspace
/build
/dist
View .travis.yml
language: node_js
node_js:
- "8.11"
install:
- npm install
cache:
directories:
- node_modules
script:
- npm run build
View git-tag-delete-local-and-remote.sh
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@constgen
constgen / .travis.yml
Last active May 30, 2018
Travis GitHub release
View .travis.yml
language: node_js
node_js:
- "8.11"
install:
- npm install
cache:
directories:
- node_modules
script:
- npm test
@constgen
constgen / .travis.yml
Last active Jun 24, 2019
Travis NPM publishing
View .travis.yml
language: node_js
node_js:
- "8"
install:
- npm install
cache:
directories:
- node_modules
script:
- npm test
@constgen
constgen / app.js
Last active Apr 29, 2018
Koa2 with router and Hot Module Replacement
View app.js
'use strict';
let Koa = require('koa');
let jsonBody = require('koa-json-body');
let router = require('./router');
let defaultErrorHandler = require('./default-error-handler');
module.exports = new Koa()
.use(defaultErrorHandler)
.use(jsonBody({ limit: '1mb', fallback: true, strict: true }))
@constgen
constgen / settings.json
Last active Nov 24, 2018
Files associations in VSCode
View settings.json
{
"files.associations": {
"*.vue": "vue",
".stylelintrc": "json"
}
}
@constgen
constgen / settings.json
Created Aug 2, 2017
Language specific VSCode config
View settings.json
{
"[javascript]": {
"editor.tabSize": 2,
"editor.insertSpaces": true
},
"[vue]": {
"editor.tabSize": 2,
"editor.insertSpaces": true
},
"eslint.options": {
View gist:383fbfa6ed8460b4da21d8c178e3f468
#!/bin/zsh
function lintit () {
OUTPUT=$(git diff --name-only | grep -E '(.js)$')
a=("${(f)OUTPUT}")
e=$(eslint -c eslint.json $a)
echo $e
if [[ "$e" != *"0 problems"* ]]; then
echo "ERROR: Check eslint hints."
exit 1 # reject
You can’t perform that action at this time.