mkdir nuProject
bower init
npm init -y
touch gulfile.js
mkdir -p public/{css,js}
touch public/css/style.css
touch public/js/script.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = require('assert'); | |
describe('String#split', function(){ | |
it('should return an array', function(){ | |
assert(Array.isArray('a,b,c'.split(','))); | |
}); | |
}); |
use: Node.js Request, to: query googleMaps' API via HTTP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var bower = require('bower'); | |
var concat = require('gulp-concat'); | |
var sass = require('gulp-sass'); | |
var minifyCss = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
var sh = require('shelljs'); | |
var tsd = require('gulp-tsd'); | |
var typescript = require('gulp-tsc'); |
127.0.0.1 - - [26/Mar/2016:19:09:19 -0400] "GET / HTTP/1.1" 401 194 "" "Mozilla/5.0 Gecko" "-"
%{IPORHOST:clientip} (?:-|(%{WORD}.%{WORD})) %{USER:ident} \[%{HTTPDATE:timestamp}\] "(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})" %{NUMBER:response} (?:%{NUMBER:bytes}|-) %{QS:referrer} %{QS:agent} %{QS:forwarder}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface IStorageService { | |
set(key: string, value: any): void; | |
remove(key: string): void; | |
get(key: string, defaultValue: any): any; | |
setObject(key: string, value: any): void; | |
getObject(key: string): any; | |
removeObject (key: string): void; | |
} | |
class StorageService implements IStorageService { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -a PKG_LIST=(google-cloud-packages-archive-keyring \ | |
google-compute-engine google-compute-engine-oslogin \ | |
python-google-compute-engine python3-google-compute-engine) | |
declare -x APT_SERVER="packages.cloud.google.com" | |
curl https://$APT_SERVER/apt/doc/apt-key.gpg | apt-key add - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
labels: | |
app: nginx | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8 | |
USER node | |
ENV HOME=/home/node | |
RUN mkdir $HOME/app | |
WORKDIR $HOME/app | |
COPY package.json $HOME/app | |
RUN npm set progress=false && \ | |
npm config set depth 0 && \ | |
npm install --only=production && \ | |
npm cache clean --force |