Skip to content

Instantly share code, notes, and snippets.

@Zurc
Zurc / nvmCommands.js
Created January 31, 2025 17:18 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@Zurc
Zurc / useHexo.md
Created April 5, 2022 21:47 — forked from christopher-black/useHexo.md
How to use Hexo and deploy to GitHub Pages
@Zurc
Zurc / mysql-docker.sh
Created April 2, 2021 12:06 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
#
# Building an MVP?
# Need a quick database you can set up in seconds?
# What about JSON?
#
# by @levelsio (with help from @marckohlbrugge, @oskarth, @maxdeviant and @kumailht)
# JS
db=[]
fs=require('fs')
@Zurc
Zurc / intro.md
Created October 5, 2020 11:36 — forked from derhuerst/intro.md
Installing Git on Linux, Mac OS X and Windows
@Zurc
Zurc / formUtils.factory.ts
Created July 28, 2020 14:56 — forked from kmaida/formUtils.factory.ts
Angular Date Validator - directive and factory - validates strings m/d/yyyy
// MM/DD/YYYY, M/D/YYYY
const DATE_REGEX = new RegExp(/^(\d{2}|\d{1})\/(\d{2}|\d{1})\/\d{4}$/);
export { DATE_REGEX };
@Zurc
Zurc / _cssTable.sass
Created January 21, 2020 19:31 — forked from if540/_cssTable.sass
css table (Bem style)
/* cssTable */
.c-cssTable
display: table
+has(thead)
display: table-header-group
+has(tbody)
display: table-row-group
@Zurc
Zurc / QueryParams.js
Created November 29, 2017 14:32 — forked from andrewjmead/QueryParams.js
Get Query Params By Name
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == variable) {
return decodeURIComponent(pair[1]);
}
}
@Zurc
Zurc / Mac OS X: Open in Visual Studio Code
Created November 21, 2017 09:57 — forked from tonysneed/Mac OS X: Open in Visual Studio Code
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@Zurc
Zurc / gist:ff3bc1336004e3296d5cb8cb233ea86b
Created March 28, 2017 20:46 — forked from paulallies/gist:0052fab554b14bbfa3ef
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master