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
using System; | |
namespace DesignPatterns.Factory.Structural | |
{ | |
/// <summary> | |
/// MainApp startup class for Structural | |
/// Factory Method Design Pattern. | |
/// </summary> | |
class MainApp | |
{ |
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
using System; | |
using System.Collections.Generic; | |
namespace DesignPatterns.Factory.RealWorld | |
{ | |
/// <summary> | |
/// MainApp startup class for Real-World | |
/// Factory Method Design Pattern. | |
/// </summary> | |
class MainApp |
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
using System; | |
using System.Collections.Generic; | |
namespace DesignPatterns.Builder.Structural | |
{ | |
/// <summary> | |
/// MainApp startup class for Structural | |
/// Builder Design Pattern. | |
/// </summary> | |
public class MainApp |
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
using System; | |
using System.Collections.Generic; | |
namespace DesignPatterns.Builder.RealWorld | |
{ | |
/// <summary> | |
/// MainApp startup class for Structural | |
/// Builder Design Pattern. | |
/// </summary> | |
public class MainApp |
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
var testModule = (function () { | |
var counter = 0; | |
return { | |
incrementCounter: function () { | |
return counter++; | |
}, | |
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
var basketModule = (function () { | |
// privates | |
var basket = []; | |
function doSomethingPrivate() { | |
//... | |
} | |
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> | |
Apache Web Server <!--#echo var="SCRIPT_NAME" --> | |
</title> | |
</head> | |
<body> |
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
# Define redis host & auth credentials | |
$redisHost = "redis.local" | |
$redisAuth = "redispwd" | |
# Define per site variables stored in redis | |
$sites = @("server-01","server-01") | |
# Define function to Pretty Print Json (and replace escaped json string) | |
function CleanJson($data) | |
{ |
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
# This function generates a new filename based on the current datetime | |
function GenerateFileNamePerHour | |
{ | |
# Store the current date in a variable | |
$cDate = Get-Date | |
$val = ("{0}_{1}_{2}-{3}00HRS.log" -f $cDate.Day, $cDate.Month, $cDate.Year, $cDate.Hour) | |
return $val | |
} | |
# This script will run till the 328th day of the year |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<Response> | |
<Dial> | |
<Conference waitUrl="http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient">pv-conference</Conference> | |
</Dial> | |
</Response> |
OlderNewer