Skip to content

Instantly share code, notes, and snippets.

Constantine Genchevsky constgen

View GitHub Profile
@constgen
constgen / .github_workflows_npm.yml
Last active Jul 4, 2020
GitHub Action for NPM publishing
View .github_workflows_npm.yml
name: Publish
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
@constgen
constgen / index.js
Created Apr 4, 2020 — forked from timneutkens/index.js
Clear console/terminal in node.js the right way
View index.js
const readline = require('readline')
const blank = '\n'.repeat(process.stdout.rows)
console.log(blank)
readline.cursorTo(process.stdout, 0, 0)
readline.clearScreenDown(process.stdout)
View node.js
let internalIp = require('internal-ip');
let host = internalIp.v4.sync()
@constgen
constgen / .travis.yml
Last active Oct 15, 2019
Travis deploy with SSH
View .travis.yml
language: node_js
node_js:
- "10.15"
install:
- npm install
cache:
directories:
- node_modules
script:
- npm test
@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
@constgen
constgen / .travis.yml
Last active Feb 6, 2020
Github Pages
View .travis.yml
language: node_js
node_js:
- "10"
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 Feb 5, 2020
Travis NPM publishing
View .travis.yml
os: linux
language: node_js
node_js:
- "8"
install:
- npm install
cache:
directories:
- node_modules
script:
You can’t perform that action at this time.