Skip to content

Instantly share code, notes, and snippets.

View leventyalcin's full-sized avatar
💭
Available to hire

Levent Yalcin leventyalcin

💭
Available to hire
View GitHub Profile
DEFAULT_GOAL := help
.PHONY: help
help:
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@leventyalcin
leventyalcin / cf.tf
Created August 12, 2021 14:54
Impossible to use Cloudflare provider
resource "cloudflare_zone" "site" {
zone = "leventyalcin.com"
plan = "free"
type = "full"
}
resource "cloudflare_page_rule" "site" {
zone_id = cloudflare_zone.site.id
priority = 1
status = "active"
@leventyalcin
leventyalcin / dht.py
Created January 17, 2021 21:18
DHT data as Prometheus metrics
#!/usr/bin/env python3
import sys
import Adafruit_DHT
from prometheus_client import start_http_server, Gauge
import time
import logging
import logging.handlers
logging.basicConfig(level=logging.NOTSET)
Process: GoPro Quik [16324]
Path: /Applications/GoPro Quik.app/Contents/MacOS/GoPro Quik
Identifier: com.GoPro.goproapp
Version: 2.6.2 (2.6.2.762)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: GoPro Quik [16324]
User ID: 501
Date/Time: 2019-11-03 22:49:48.576 +0000
# Slack command generator for AWS status feeds of the default region
for i in $(curl -q -o- http://status.aws.amazon.com | grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | grep $AWS_DEFAULT_REGION | awk -F'"' '{print $2}'); \
do \
echo "/feed subscribe http://status.aws.amazon.com$i"; \
done

Keybase proof

I hereby claim:

  • I am leventyalcin on github.
  • I am leventyalcin (https://keybase.io/leventyalcin) on keybase.
  • I have a public key ASDxttjwLSfdgaaP8zGamQnKIl3aFjnuowbft9PVEixt3wo

To claim this, I am signing this object:

@leventyalcin
leventyalcin / out.log
Last active September 8, 2016 13:10
upstart's bullshit! how I'm gonna start a friggin service if it is not started! grep and friggin string comparison? I expect to be able to "status SERVICE || start SERVICE"
# start pritunl
start: Job is already running: pritunl
# echo $?
1
# status pritunl
pritunl start/running, process 8261
# echo $?
0
the code moved to this repo - https://github.com/azmesai/typeform
# It's ok
"UserData":{
"Fn::Base64":{
"Fn::Join":[
"",
[
"#!/bin/bash\n",
"yum update -y\n",
"command\n",
"command\n",