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
resource "google_compute_network" "badcluster_vpc" { | |
name = "badcluster-vpc" | |
auto_create_subnetworks = "false" | |
} | |
resource "google_compute_subnetwork" "badcluster_node_subnet" { | |
name = "badcluster-node-subnet" | |
region = var.region | |
network = google_compute_network.badcluster_vpc.name |
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
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
## | |
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore | |
# User-specific files | |
*.rsuser | |
*.suo | |
*.user | |
*.userosscache |
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
# build docker image | |
- template: tasks/_docker-build.yml | |
parameters: | |
workingDirectory: $(projectBaseDir) | |
tag: $(dockerImage)-$(Build.BuildId) | |
# tag and push images if branch is master or develop | |
- ${{ if in('$(Build.SourceBranchName)', 'develop', 'master') }}: | |
- template: tasks/_awscli-docker-login.yml |
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 python:3 | |
WORKDIR /usr/src/app | |
COPY requirements.txt ./ | |
RUN pip install --no-cache-dir -r requirements.txt | |
COPY . . | |
CMD [ "python", "./tint.py" ] |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var words = File.ReadAllLines("words.txt").Select(x => new Word(x)).ToArray(); | |
var candidate = new Word("ethylenediaminetetraacetates"); | |
var watch = new Stopwatch(); |
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
public class AppSettingsLoader | |
{ | |
public static T Load<T>() where T : new() | |
{ | |
var props = typeof (T).GetProperties(); | |
var result = new T(); | |
foreach (var prop in props) | |
{ | |
var name = GetSettingName(prop); | |
var setting = ConfigurationManager.AppSettings[name]; |
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
<Target Name="AfterBuild"> | |
<CallTarget Targets="MinifyJs" /> | |
</Target> | |
<PropertyGroup> | |
<AjaxMin>"C:\Program Files (x86)\Microsoft\Microsoft Ajax Minifier\AjaxMin.exe"</AjaxMin> | |
</PropertyGroup> | |
<Target Name="MinifyJs"> | |
<ItemGroup> |
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
util = { | |
//calls a func every [timeout] ms for [stopMillis] ms. | |
//returns a jQuery.Promise | |
every: function (func, timeout, stopMillis, callnow) { | |
function _every(func, timeout, absoluteStop, deferred) { | |
if (new Date().getTime() >= absoluteStop) { | |
deferred.resolve(); | |
return; | |
} | |
func(); |
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
//hitMe / hitUs : sends the server the current timestamp and the number of calls to make back to the client. hitMe: just the callign client, hitUs: all clients on the hub. | |
//stepOne / stepAll : increments a counter | |
//doneOne / doneAll : prints # of messages and total duration. | |
$(function () { | |
function log(message) { | |
var $newMessage = $("<li/>", { text: message }); | |
$("#messages").prepend($newMessage); | |
return $newMessage; | |
}; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using SignalR.Hubs; | |
using System.Threading; | |
namespace SignalRBench | |
{ | |
public class HubBench : Hub, IConnected, IDisconnect |
NewerOlder