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
provider "aws" { | |
region = "eu-west-2" | |
} | |
resource "aws_instance" "ec2" { | |
ami = "ami-032598fcc7e9d1c7a" | |
instance_type = "t2.micro" | |
} |
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
KBD US "EN Intl with dead keys" | |
COPYRIGHT "(c) 2024 asmeikal@me.com" | |
COMPANY "asmeikal@me.com" | |
LOCALENAME "en-US" | |
LOCALEID "00000409" |
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
const { configureStore, combineReducers } = require("@reduxjs/toolkit"); | |
const { has, set, get } = require("lodash"); | |
const reducers = {}; | |
const store = configureStore({ reducer: reducers }); | |
/** | |
* Combines reducers recursively. | |
* |
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
#!/usr/bin/env bash | |
PREV=$1 | |
NEW=$2 | |
changed_files="$(git diff-tree -r --name-only --no-commit-id $PREV $NEW)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" | |
} |
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
const iban_regex = new RegExp('^(AL[0-9]{2}[0-9]{8}[A-Za-z0-9]{16})|(AD[0-9]{2}[0-9]{4}[0-9]{4}[A-Za-z0-9]{12})|(AT[0-9]{2}[0-9]{5}[0-9]{11})|(AZ[0-9]{2}[A-Z]{4}[A-Za-z0-9]{20})|(BH[0-9]{2}[A-Z]{4}[A-Za-z0-9]{14})|(BE[0-9]{2}[0-9]{3}[0-9]{7}[0-9]{2})|(BA[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{8}[0-9]{2})|(BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z]{1}[A-Za-z0-9]{1})|(BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Za-z0-9]{8})|(CR[0-9]{2}[0-9]{3}[0-9]{14})|(HR[0-9]{2}[0-9]{7}[0-9]{10})|(CY[0-9]{2}[0-9]{3}[0-9]{5}[A-Za-z0-9]{16})|(CZ[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{10})|(DK[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1})|(FO[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1})|(GL[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1})|(DO[0-9]{2}[A-Za-z0-9]{4}[0-9]{20})|(EE[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{11}[0-9]{1})|(FI[0-9]{2}[0-9]{6}[0-9]{7}[0-9]{1})|(FR[0-9]{2}[0-9]{5}[0-9]{5}[A-Za-z0-9]{11}[0-9]{2})|(GE[0-9]{2}[A-Z]{2}[0-9]{16})|(DE[0-9]{2}[0-9]{8}[0-9]{10})|(GI[0-9]{2}[A-Z]{4}[A-Za-z0-9]{15})|(GR[0-9]{2}[0-9]{3}[0-9]{4}[A-Za-z0-9]{16})|(GT[0-9]{2}[A-Za-z0-9]{4}[A-Za-z0-9]{20})|(HU[0-9]{2} |
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
nNodes = 10; | |
nEdges = 20; | |
nMonitors = 5; | |
G = makeGraph(nNodes,nEdges); | |
plot(G); | |
monitors = randperm(nNodes); |
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
s = 0.2; | |
n = 10; | |
M = zeros(n); | |
for i = 1:n | |
for j = 1:n | |
if rand(1) <= s |