Skip to content

Instantly share code, notes, and snippets.

View bensmind's full-sized avatar

Ben Johnson bensmind

View GitHub Profile
Employee = (function(){
// private static field
var numEmployees = 0;
// class function a.k.a. constructor
function cls()
{
// private instance fields
var name = "";
<tr ng:repeat="item in viewModel.sortedDetailHistory" class="eventHistory item{{item.description.index}} layer{{item.description.containmentLayer}} first-{{item.isFirst}}" ng-class="{'highlight': item.highlight == true}">
angular.element($0).scope().item
returns:
{
//...
"isFirst": false,
"$$hashKey": "object:7",
"highlight": true
var myModule = angular.module('myModule', []);
myModule.factory('userApiService', ['$http', function($http) {
return {
get: function(id){
var request = {
method:'get',
url:'/api/user/' + id
};
return $http(request);
}
To Export the Application Pools on IIS 7 :
%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml
To import the Application Pools:
%windir%\system32\inetsrv\appcmd add apppool /in < c:\apppools.xml
To Export all you’re website:
%windir%\system32\inetsrv\appcmd list site /config /xml > c:\sites.xml
To Import the website:
#powershell -NoProfile -ExecutionPolicy unrestricted -Command
$url = 'https://gist.githubusercontent.com/bensmind/0a5a524749018ad274d1/raw/74cd0623262346646901aa370221921514d3d15f/cinst.init.ps1'
$wc = new-object net.webclient
iex ($wc.DownloadString($url))
@bensmind
bensmind / cinst.init.ps1
Last active November 6, 2015 18:37
Cinst batch
powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
#tools
cinst sysinternals
cinst notepadplusplus.install
cinst 7zip.install
cinst ColorPic
#network
cinst putty