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
GOPATH=$(shell pwd)/vendor:$(shell pwd) | |
GOBIN=$(shell pwd)/bin | |
GOFILES=$(wildcard *.go) | |
GONAME=$(shell basename "$(PWD)") | |
PID=/tmp/go-$(GONAME).pid | |
build: | |
@echo "Building $(GOFILES) to ./bin" | |
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go build -o bin/$(GONAME) $(GOFILES) |
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
Node Exporter | |
----------------------------------------------------------------------------------------------------------------- | |
curl -Lo /etc/yum.repos.d/_copr_ibotty-prometheus-exporters.repo https://copr.fedorainfracloud.org/coprs/ibotty/prometheus-exporters/repo/epel-7/ibotty-prometheus-exporters-epel-7.repo | |
yum install -y node_exporter | |
sudo echo 'kernel.perf_event_paranoid=-1' > '/etc/sysctl.d/51-enable-perf-events.conf' |
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
Parallel queues model with PDQ | |
Took as an example the "Internet Provider" from "The practical Performance Analyst". | |
#!/usr/bin/perl | |
use pdq; | |
# Globals | |
$arrivRate = 3; |
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
"use strict"; | |
const aws = require("@pulumi/aws"); | |
let size = "t1.micro"; | |
let ami = "ami-0ac019f4fcb7cb7e6"; | |
let localKey = "local-mac"; | |
let nodes = []; | |
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
import org.jgroups.JChannel; | |
import org.jgroups.Message; | |
import org.jgroups.ReceiverAdapter; | |
import org.jgroups.View; | |
import org.jgroups.util.Util; | |
public class Chat { | |
public static void main(String[] args) throws Exception { | |
JChannel ch = new JChannel("tcp.xml"); |
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.Drawing; | |
using System.IO; | |
using System.Linq; | |
namespace TooMuchWhite | |
{ | |
class Program | |
{ |
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
Logical view | |
Code and its structures 5:26 | |
Process view | |
How the elements of code gets packaged in units of deployment | |
Physical view | |
How those get plugged to phisical machines | |
Scenarios |
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 FractionalKnapsack { | |
public static class Loot implements Comparable{ | |
public Loot(int i, int v, int w){ | |
Index = i; | |
Ratio = (double)v / w; | |
Weight = w; | |
Benefit = v; | |
} |
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.Configuration; | |
using System.Linq; | |
using Microsoft.WindowsAzure.Storage; | |
using Newtonsoft.Json; | |
using Streamstone; | |
namespace InServiceCqrs | |
{ | |
class Program |
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 FibonacciLastDigit { | |
private static int getFibonacciLastDigit(int n) { | |
if (n <= 1) | |
return n; | |
int previous = 0; | |
int current = 1; | |
for (int i = 0; i < n - 1; ++i) { |
NewerOlder