Skip to content

Instantly share code, notes, and snippets.

View ivstudio's full-sized avatar

Ignacio Villamar ivstudio

View GitHub Profile
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
/lib

update object

var state = {
    id: 1,
    points: 100,
    name: "Goran"
};

var newState = {
@ivstudio
ivstudio / samplerest.js
Created August 16, 2019 13:51 — forked from joshbirk/samplerest.js
Sample of using passport w/ mult strategies
var fs = require("fs")
var ssl_options = {
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
};
var port = process.env.PORT || 3000;
var express = require('express');
var ejs = require('ejs');
var passport = require('passport')
@ivstudio
ivstudio / docker-cleanup-resources.md
Created July 17, 2019 12:00 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

/* --------------------------------
Typography
-------------------------------- */
:root {
--font-primary: sans-serif;
--font-secondary: serif;
@ivstudio
ivstudio / mongo-commands.md
Created March 30, 2018 13:17 — forked from dimitardanailov/mongo-commands.md
MongoDB - Commands
# Get documents, where writters are Joel Coen and Ethan Coen.
db.movieDetails.find({ "writters" : ["Joel Coen", "Ethan Coen"] }).count()
# Get documents, where Jeff Bridges is playing leading role.
> db.movieDetails.find({ "actors.0": "Jeff Bridges" }).pretty()
@ivstudio
ivstudio / gh-pages-dist
Last active February 28, 2018 12:18
GitHub pages - push dist folder only command
git checkout -g gh-pages
git subtree push --prefix dist orign gh-pages
/* if using Webpack Add script to package.json */
"scripts": {
"clean": "rimraf dist",
"build" : "NODE_ENV=production npm run clean && webpack -p"
"serve" : "webpack-dev-server"