Skip to content

Instantly share code, notes, and snippets.

View beeman's full-sized avatar
🐝
Buzzin....

beeman beeman

🐝
Buzzin....
View GitHub Profile
Verifying that +beeman is my blockchain ID. https://onename.com/beeman

fc-base-pen [ Angular - UI-Router - Bootstrap ]

This is a template with :

  • angular 1.5.3
  • ui-router 1.0.0-alpha.4
  • bootstrap-3.3.6
  • font-awesome-4.6.1

A couple of notes on this template:

@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
# Clean up dependencies in packages
nps lerna clean
# Clean up local node_modules
rm -r node_modules
# Install local node_modules
npm install
# Install dependencies in packages
nps setup
import { NgModuleRef, ApplicationRef } from '@angular/core';
import { createNewHosts } from '@angularclass/hmr';
export const hmrBootstrap = (module: any, bootstrap: () => Promise<NgModuleRef<any>>) => {
let ngModule: NgModuleRef<any>;
module.hot.accept();
bootstrap().then(mod => ngModule = mod);
module.hot.dispose(() => {
const appRef: ApplicationRef = ngModule.injector.get(ApplicationRef);
const elements = appRef.components.map(c => c.location.nativeElement);
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import { hmrBootstrap } from './hmr';
if (environment.production) {
enableProdMode();
@beeman
beeman / dploy-user-data.sh
Last active February 11, 2017 07:36
Custom user data script for dply.co https://dply.co/b/FVl9WY5k
#!/bin/sh
# Create and activate swap
dd if=/dev/zero of=/swapfile bs=256M count=4
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
# Activate swapfile on boot
echo "" >> /etc/fstab
echo "/swapfile none swap sw 0 0" >> /etc/fstab
a, p, h1, h2, h3 {
font-family: "Roboto","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
color: #546E7A;
}
a {
color: #1976D2;
}
/tmp
❯ mkdir test-deprecation
/tmp
❯ cd test-deprecation
/tmp/test-deprecation
❯ npm init -y
Wrote to /private/tmp/test-deprecation/package.json:
root@test:~# git clone https://github.com/angular/angular-cli.git
Cloning into 'angular-cli'...
remote: Counting objects: 12248, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 12248 (delta 2), reused 0 (delta 0), pack-reused 12227
Receiving objects: 100% (12248/12248), 3.00 MiB | 0 bytes/s, done.
Resolving deltas: 100% (6249/6249), done.
Checking connectivity... done.
root@test:~# cd angular-cli/
root@test:~/angular-cli# npm i