Skip to content

Instantly share code, notes, and snippets.

View constgen's full-sized avatar

Constantine Genchevsky constgen

View GitHub Profile
@constgen
constgen / .gitlab-ci.yml
Last active January 1, 2021 18:49
GitLab publish to NPM
image: node:12
cache:
paths:
- node_modules/
stages:
- setup
- test
- deploy
install:
@constgen
constgen / .github_workflows_npm.yml
Last active July 4, 2020 18:06
GitHub Action for NPM publishing
name: Publish
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
@constgen
constgen / index.js
Created April 4, 2020 07:35 — forked from timneutkens/index.js
Clear console/terminal in node.js the right way
const readline = require('readline')
const blank = '\n'.repeat(process.stdout.rows)
console.log(blank)
readline.cursorTo(process.stdout, 0, 0)
readline.clearScreenDown(process.stdout)
@constgen
constgen / node.js
Created March 31, 2020 21:51
Get local IP
let internalIp = require('internal-ip');
let host = internalIp.v4.sync()
@constgen
constgen / .travis.yml
Last active October 15, 2019 09:50
Travis deploy with SSH
language: node_js
node_js:
- "10.15"
install:
- npm install
cache:
directories:
- node_modules
script:
- npm test
@constgen
constgen / README.md
Created December 25, 2018 15:34 — forked from bastienrobert/README.md
Script to open chrome with specific URL gived in params

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

@constgen
constgen / .gitignore
Created December 3, 2018 08:20
Git ignore
/.DS_Store
/package-lock.json
*.code-workspace
/build
/dist
@constgen
constgen / .travis.yml
Last active February 6, 2020 07:24
Github Pages
language: node_js
node_js:
- "10"
install:
- npm install
cache:
directories:
- node_modules
script:
- npm run build
@constgen
constgen / git-tag-delete-local-and-remote.sh
Created May 29, 2018 10:11 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# 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 19:54
Travis GitHub release
language: node_js
node_js:
- "8.11"
install:
- npm install
cache:
directories:
- node_modules
script:
- npm test