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
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 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
expect = chai.expect; | |
app = angular.module('TM_App') | |
app.directive "test", ()-> | |
templateUrl:"some.html", | |
replace :true | |
describe '| testing | templateUrl',-> | |
element = null |
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
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 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
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 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
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 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
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 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
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 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
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 |
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
$regHive = [Microsoft.Win32.RegistryHive]::LocalMachine | |
$regView = [Microsoft.Win32.RegistryView]::Registry32 | |
$regKey = [Microsoft.Win32.RegistryKey]::OpenBaseKey($regHive, $regView) | |
$frameworkPath = $regKey.OpenSubKey("SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full").GetValue("InstallPath") | |
$frameworkPath | |
#returns D:\Windows\Microsoft.NET\Framework\v4.0.30319\ |
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
// a) Public IP address | |
WebClient webClient = new WebClient(); | |
var IP = webClient.DownloadString("http://checkip.dyndns.org/"); | |
return IP; // Current IP Address: 104.45.82.120 | |
//using System.Net; | |
//b) current hostname | |
return Dns.GetHostName(); // RD000D3AB0B28A |