Skip to content

Instantly share code, notes, and snippets.

View SOSANA's full-sized avatar

Zach Sosana SOSANA

View GitHub Profile
@SOSANA
SOSANA / nvmCommands.js
Last active September 11, 2023 19:32
Useful NVM commands
// https://github.com/nvm-sh/nvm#installing-and-updating
// check local version of node/npm
node -v
npm -v
// list available nvm node versions
nvm ls-remote
// list installed versions of node
@SOSANA
SOSANA / updateNpm.bat
Last active May 20, 2018 18:21
Update npm on windows using nvm-windows. Script runs latest, npm version just replace "latest" with version desired. Place script in nvm root folder C:\Users\<user>\AppData\Roaming\nvm or run %appdata% to locate nvm folder
@echo off
SETLOCAL EnableDelayedExpansion
if [%1] == ["latest"] (
echo Pass in the version you would like to install, or "latest" to install the latest npm version.
) else (
set wanted_version="latest"
if "!wanted_version!" == "latest" (
for /f %%i in ('npm show npm version') do set wanted_version=%%i
@SOSANA
SOSANA / VSCODE_USER_SETTINGS.json
Last active March 17, 2022 04:40
VS Code user settings
{
"editor.tabSize": 2,
"editor.fontSize": 15,
"editor.snippetSuggestions": "top",
"editor.formatOnSave": true,
"window.zoomLevel": 1,
"emmet.triggerExpansionOnTab": true,
"editor.wordWrap": "on",
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"prettier.singleQuote": true,
@SOSANA
SOSANA / package.json
Last active August 15, 2020 22:48
Google Chrome Live Server browser-sync setup for Linux or Windows OS
{
"name": "future-project",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "run-script-os",
"start:win32":
"browser-sync start --server --files '**/*.css, **/*.html, **/*.js, !node_modules/**/*' --directory --port 7777 --browser \"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"",
"start:darwin:linux":
@SOSANA
SOSANA / package.json
Last active November 19, 2019 19:04
Firefox Developer Edition Live Server browser-sync setup for Linux or Windows OS
{
"name": "test-project",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "run-script-os",
"start:win32": "browser-sync start --server --files '**/*.css, **/*.html, **/*.js, !node_modules/**/*' --directory --port 7777 --browser \"C:\\Program Files\\Firefox Developer Edition\\firefox.exe\"",
"//": "Hello! If you are having trouble running this command. Try changing Firefox Developer Edition to FirefoxDeveloperEdition",
"start:darwin:linux": "browser-sync start --server --files '**/*.css, **/*.html, **/*.js, !node_modules/**/*' --directory --port 7777 --browser 'Firefox Developer Edition'"
@SOSANA
SOSANA / .babelrc
Created March 25, 2017 17:43
from the book survivejs webpack
{
"plugins": [
"syntax-dynamic-import"
],
"presets": [
[
"env",
{
"targets": {
"browsers": ["IE 8"]
@SOSANA
SOSANA / .gitignore
Created March 1, 2017 22:32
.gitignore to ignore all those un-need pesky files!
# See http://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
node_modules
npm-debug.log
# testing
coverage
# production
@SOSANA
SOSANA / .babelrc
Last active March 25, 2017 18:10
Babel Config
{
"presets": [
[
"env",
{
"targets": {
"browsers": ["IE 8"]
}
}
],
@SOSANA
SOSANA / .editorconfig
Last active February 23, 2017 18:10
Editor Config
# EditorConfig is awesome: http://EditorConfig.org
root = true
# Unix-style newlines with a newline ending every file
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@SOSANA
SOSANA / nodemon.json
Created February 22, 2017 21:52
nodemon config
{
"restartable": "rs",
"ignore": [
".git",
"node_modules/**/node_modules"
],
"verbose": true,
"events": {
"restart": "osascript -e 'display notification \"App restarted due to:\n'$FILENAME'\" with title \"nodemon\"'"
},