Skip to content

Instantly share code, notes, and snippets.

@cwilby
cwilby / README.md
Last active November 28, 2016 19:09

Writing minification safe Angular code

The biggest reason we minify code before deploying to a live web server is that it reduces the overall size of our website.

However, minification can be dangerous if your code is not "minification safe".

This gist serves as an example of what can happen if you do not write "minification safe" Angular code.

Minification Safe

Fixing Clean My Car

Step 1 - Apply a hotfix

On one persons machine, perform the following steps

  • git checkout master
  • git checkout -b hotfix-dbcontextfix
  • Implement the fix (test by running the project)
  • git add .
REM make sure you run this script in administrative mode.
REM install chocolatey
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
REM install chocolatey packages
choco install git.install
choco install visualstudio2017community
choco install googlechrome
choco install skype
@cwilby
cwilby / npm-debug.log
Last active July 4, 2017 04:41
Logs for npm issue encountered using NVM and Yeoman
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/7.5.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'uninstall',
1 verbose cli '-g',
1 verbose cli 'yo' ]
2 info using npm@5.0.4
3 info using node@v7.5.0
4 verbose npm-session f7d88665617de50f
5 silly install loadCurrentTree
@cwilby
cwilby / learn-by-doing.md
Created September 7, 2017 20:01
C# Practical Exercise
@cwilby
cwilby / gist:8f345c3d899809fab44bc7c5dddc610c
Created September 11, 2017 17:54
OCA Classroom - Frequently Asked Questions

Frequently Asked Questions about the Classroom

If you have questions that aren't answered here, feel free to ask a member of staff or a fellow student.

  • Restrooms?: Go out the door, Mens is toward the left, Womens is to the right.
  • Lunch?: No strict schedule, most take lunch anywhere between 11AM to 1PM and take about 1 hour.
  • Parking?: Ask staff/students for the current "best deal".
@cwilby
cwilby / README.md
Last active February 16, 2018 00:07
Loopback Remote Method

Problem

Given models A and B (where A has many B), what is the most performant way to accomplish the following with Loopback?

* Create A
* Create B
* Add B to A

Solution A - Remote Method

@cwilby
cwilby / ssl-proxy-jenkins.sh
Last active April 28, 2018 22:04 — forked from freemanirl/ssl-proxy-jenkins.sh
LetsEncrypt Jenkins SSL Proxy Nginx
#!/bin/bash
sudo apt-get install -y epel-release nginx certbot
sudo apt-get install -y certbot
sudo setsebool -P httpd_can_network_connect 1
# install well-known conf in nginx.
systemctl restart nginx.service
certbot certonly -a webroot --webroot-path=/usr/share/nginx/html -d jenkins.cwserve.com
acmeco: Are you sure you want to destroy the 'acmeco' VM? [y/N] y
==> acmeco: Forcing shutdown of VM...
==> acmeco: Destroying VM and associated drives...
Bringing machine 'acmeco' up with 'virtualbox' provider...
==> acmeco: Importing base box 'laravel/homestead'...
==> acmeco: Matching MAC address for NAT networking...
==> acmeco: Checking if box 'laravel/homestead' is up to date...
==> acmeco: Setting the name of the VM: acmeco
==> acmeco: Fixed port collision for 3306 => 33060. Now on port 2200.
==> acmeco: Clearing any previously set network interfaces...