Skip to content

Instantly share code, notes, and snippets.

View asanchezr's full-sized avatar

Alejandro Sanchez asanchezr

  • Victoria BC, Canada
View GitHub Profile
  • 🎨 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug
@asanchezr
asanchezr / README.md
Created October 25, 2017 22:31
Add Lodash to Angular 2+

Commands

Yarn

Install lodash:

> yarn add lodash
@asanchezr
asanchezr / README-Template.md
Created February 15, 2018 21:37 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@asanchezr
asanchezr / setup-gh-cli-auth-2fa.md
Last active June 8, 2018 22:51 — forked from ateucher/setup-gh-cli-auth-2fa.md
Setup git on the CLI to use 2FA with GitHub

These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.

  1. Download and install the git command-line client (if required).

  2. Open the git bash window and introduce yourself to git (if required):

    git config --global user.name 'Firstname Lastname'
    git config --global user.email 'firstname.lastname@gov.bc.ca'
    
@asanchezr
asanchezr / docker-error-fix.md
Created June 9, 2018 01:33
docker error starting userland proxy input/output error
@asanchezr
asanchezr / 1-WSL and Docker for Windows.md
Created June 9, 2018 02:35 — forked from kekru/1-WSL and Docker for Windows.md
Windows 10 Subsystem for Linux combined with Docker for Windows

Using Windows Subsystem for Linux combined with Docker for Windows

Docker CE for Windows

  • Install Docker CE for Windows
  • Go to Docker for Windows Settings -> General and enable Expose daemon on tcp://localhost:2375 without TLS.
    This will enable the Docker remote API for requests, coming from localhost, not from another computer in your network. A TLS secured version is not yet supported in Docker for Windows. See docker/for-win#453 for more information. I also tried a daemon.json file with options tlscacert, tlscert, tlskey and tlsverify, but Docker for Windows crashed on booting.

Install Windows Subsystem for Linux (WSL)

@asanchezr
asanchezr / Node-gyp.md
Last active June 12, 2018 19:35
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe"

https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules

There are three primary reasons you might be interested in this section:

  • you have an existing C++ library you'd like to take advantage of in your Node.js application
  • you are interested in optimizing the performance of some code by writing it in C++
  • you're running into dreaded node-gyp issues and have no idea what's going on.

Identifying native modules

How do you know if an npm package you want to install is a native module? Look for nan, node-gyp, or node-pre-gyp dependencies.

@asanchezr
asanchezr / chocolatey-env-setup.ps1
Created June 18, 2018 18:01 — forked from amogram/chocolatey-env-setup.ps1
A Chocolatey script for PowerShell I use to set up my Windows development environment. I use this when setting up my own Dev VMs. Use at your own risk.See http://bit.ly/1a301JK and http://chocolatey.org/ for more information.
# Simple environment setup script
# Install Applications
choco install fiddler4
choco install notepadplusplus
choco install visualstudiocode
choco install greenshot
choco install GoogleChrome
choco install putty
choco install ccleaner
@asanchezr
asanchezr / Multi-Step Build for Docker.md
Created June 26, 2018 20:56
Dockerfile that builds Angular app from source, then hosts the minified code on Ngnix container
FROM node:8.6 as builder

WORKDIR /home/node/angular-seed

# copy all files not listed in .dockerignore
COPY . .

# before switching to non-root user, change ownership of home
RUN chown -R node:node .