Skip to content

Instantly share code, notes, and snippets.

View constgen's full-sized avatar

Constantine Genchevsky constgen

View GitHub Profile
@constgen
constgen / keybindings.json
Last active December 11, 2018 14:55
VS Code settings
[
{
"key": "ctrl+shift+a",
"command": "editor.emmet.action.wrapIndividualLinesWithAbbreviation",
"when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus"
}
]
@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 / .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 / .travis.yml
Last active February 5, 2020 21:10
Travis NPM publishing
os: linux
language: node_js
node_js:
- "8"
install:
- npm install
cache:
directories:
- node_modules
script:
@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 / node.js
Created March 31, 2020 21:51
Get local IP
let internalIp = require('internal-ip');
let host = internalIp.v4.sync()
@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 / .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 / .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: