This file contains 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
New windows VM (note: this needs to be converted into a script) | |
1) installed chocolatey | |
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin | |
2) installed chrome, fiddler, git, VS Code | |
choco install googlechrome git fiddler4 -y |
This file contains 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
public static class HtmlControls_ExtensionMethods | |
{ | |
public static string renderControl(this Control control) | |
{ | |
var stringBuilder = new StringBuilder(); | |
using (var stringWriter = new StringWriter(stringBuilder)) | |
using (var htmlTextWriter = new HtmlTextWriter(stringWriter)) | |
control.RenderControl(htmlTextWriter); | |
return stringBuilder.str(); |
This file contains 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
Mocha = require 'mocha' | |
expect = require('chai').expect | |
mocha = new Mocha {ui: 'bdd'} | |
mocha.suite.emit 'pre-require', this, 'solution', mocha | |
describe 'test', -> | |
it 'acb', -> | |
expect(12).to.equal(12) | |
This file contains 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
expect = chai.expect; | |
app = angular.module('TM_App') | |
app.directive "test", ()-> | |
templateUrl:"some.html", | |
replace :true | |
describe '| testing | templateUrl',-> | |
element = null |
This file contains 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
extends index.jade | |
append head | |
base(href='/angular/component/') | |
script. | |
angular.module('TM_App') //disable routing | |
.config( | |
function($stateProvider, $urlRouterProvider, $locationProvider) | |
{ | |
$urlRouterProvider.deferIntercept(); | |
}); |
This file contains 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
function TodoCtrl( $scope ) | |
{ | |
$scope.todos = | |
[ | |
{ text: 'learn angular', done:true }, | |
{ text: 'build an angular app', done:false }, | |
{ text: 'A NEW Angular TO DO', done:true } | |
]; | |
$scope.addTodo = function() |
This file contains 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
extends ../../../TM_Jade/_layouts/page_logged_out.jade | |
block content | |
script(src='/angular/js/lib.js') | |
#application | |
.row | |
.col-3 | |
.col-3 | |
div(ng-controller="TestController") |
This file contains 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
doctype html | |
html(lang="en") | |
head | |
meta(charset="utf-8") | |
title Test | |
script(src='https://ajax.googleapis.com/ajax/libs/angularjs/1.4.1/angular.js') | |
script(src='http://coffeescript.org/extras/coffee-script.js') | |
style. | |
input { width: 200px } | |
This file contains 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
File Watcher | |
CoffeeScript | |
``` | |
/usr/local/bin/coffee | |
--output $ProjectFileDir$/.dist/$FileDirRelativeToProjectRoot$/ --compile --map $FileName$ | |
$FileDir$ | |
$ProjectFileDir$/.dist/$FileDirRelativeToProjectRoot$/$FileNameWithoutExtension$.js:$ProjectFileDir$/dist/$FileDirRelativeToProjectRoot$/$FileNameWithoutExtension$.map |
This file contains 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
vagrant init ubuntu/trusty64 | |
vagrant up | |
vagrant ssh | |
### inside vagrant SSH | |
# JDK | |
sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless | |
# Elastic Search |