Skip to content

Instantly share code, notes, and snippets.

View alicancakil's full-sized avatar
🚀
Do. or do not. There is no try.

Alican alicancakil

🚀
Do. or do not. There is no try.
View GitHub Profile
@alicancakil
alicancakil / SecurityAudit IAM
Created February 6, 2023 21:05
arn:aws:iam::aws:policy/SecurityAudit
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Resource": "*",
"Action": [
"a4b:ListSkills",
"access-analyzer:GetAnalyzedResource",
"access-analyzer:GetAnalyzer",
@alicancakil
alicancakil / lambda-internet-check.js
Last active September 2, 2021 02:44
Checks to see if there is an internet connection
const getContent = function (url) {
// return new pending promise
return new Promise((resolve, reject) => {
// select http or https module, depending on reqested url
const lib = url.startsWith('https') ? require('https') : require('http');
const request = lib.get(url, (response) => {
// handle http errors
if (response.statusCode < 200 || response.statusCode > 299) {
reject(new Error('Failed to load page, status code: ' + response.statusCode));
}

Keybase proof

I hereby claim:

  • I am alicancakil on github.
  • I am alican (https://keybase.io/alican) on keybase.
  • I have a public key ASA0dXdTVkovuunW8kbvJir_Gpt1T1nbEmSP9goyjalB9go