git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
const s = require('http').createServer((q, s) => { | |
console.error(q.method, q.url) | |
switch (q.url) { | |
case '/': | |
return html(s) | |
case '/app.js': | |
return js(s) |
'use strict' | |
const test = require('tap').test | |
const server = { | |
inject: options => new Promise(r => r({ statusCode: 200, payload: 'Hello world' })) | |
} | |
test('Home entry', async t => { | |
const options = { | |
method: 'GET', | |
url: '/' |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
import time | |
from browsermobproxy import Server | |
server = Server('/Users/dhunt/Downloads/browsermob-proxy-2.0-beta-6/bin/browsermob-proxy') | |
server.start() | |
proxy = server.create_proxy() | |
from selenium import webdriver | |
profile = webdriver.FirefoxProfile() | |
profile.set_proxy(proxy.selenium_proxy()) | |
driver = webdriver.Firefox(firefox_profile=profile) |
#!/bin/bash | |
cat $(find app/assets/stylesheets/ -type f) | | |
grep -Eo '\.[a-z]+[a-z0-9_-]*' | sort | uniq | sed s/.// | | |
while read CSS; do | |
if ! grep -Erqi "([^(remove|has)]?class[(:|=|[:space:]*=>[:space:]*)]*[[:space:]\W]*[(\"|')]*[-a-z0-9[:space:]]*$CSS|\\.$CSS\b)" app/views/ vendor/assets/ app/assets/javascripts/; then | |
echo $CSS >> unused.scss; | |
fi | |
done |