Skip to content

Instantly share code, notes, and snippets.

View asmeikal's full-sized avatar

Michelle asmeikal

  • Rome
View GitHub Profile
@asmeikal
asmeikal / main.tf
Created October 18, 2025 09:43
mise + terraform
provider "aws" {
region = "eu-west-2"
}
resource "aws_instance" "ec2" {
ami = "ami-032598fcc7e9d1c7a"
instance_type = "t2.micro"
}
@asmeikal
asmeikal / en intl layout with dead keys.klc
Created May 15, 2024 15:21
a keyboard layout for en intl keyboards that behaves just like a mac
KBD US "EN Intl with dead keys"
COPYRIGHT "(c) 2024 asmeikal@me.com"
COMPANY "asmeikal@me.com"
LOCALENAME "en-US"
LOCALEID "00000409"
const { configureStore, combineReducers } = require("@reduxjs/toolkit");
const { has, set, get } = require("lodash");
const reducers = {};
const store = configureStore({ reducer: reducers });
/**
* Combines reducers recursively.
*
@asmeikal
asmeikal / postcheckout.sh
Created October 2, 2018 13:39
idk if this works
#!/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"
}
@asmeikal
asmeikal / iban_regex.js
Created September 17, 2018 15:36
idk why im doing this
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}
nNodes = 10;
nEdges = 20;
nMonitors = 5;
G = makeGraph(nNodes,nEdges);
plot(G);
monitors = randperm(nNodes);
@asmeikal
asmeikal / csr.m
Created March 16, 2018 12:02
MATLAB CSR compact matrix implementation
s = 0.2;
n = 10;
M = zeros(n);
for i = 1:n
for j = 1:n
if rand(1) <= s