Skip to content

Instantly share code, notes, and snippets.

View divmgl's full-sized avatar

Dexter Miguel divmgl

  • San Francisco, CA
  • 22:05 (UTC -12:00)
View GitHub Profile
@divmgl
divmgl / vpc.js
Created February 22, 2022 14:12
Smitten VPC Arc Plugin
const aws = require("aws-sdk")
const iam = new aws.IAM()
const ec2 = new aws.EC2()
const securityGroupNames = [
"allow-internal-ingress",
"allow-internal-egress",
"allow-external-egress"
]
@divmgl
divmgl / binarygap.c
Created March 23, 2017 20:37
Codility.com BinaryGap 100% in C
long bits = 0;
long max = 0;
void binary(long N) {
if (N > 1) {
binary(N / 2);
}
if (N % 2 == 0) {
bits += 1;
return;