Skip to content

Instantly share code, notes, and snippets.

View gurayops's full-sized avatar
🐳
Focusing

Guray Yildirim gurayops

🐳
Focusing
View GitHub Profile
@gurayops
gurayops / main.py
Last active August 15, 2020 02:38
CDK for Terraform AKS Example
#!/usr/bin/env python
from constructs import Construct
from cdktf import App, TerraformStack, TerraformOutput
from imports.azurerm import \
AzurermProvider, \
KubernetesCluster, \
KubernetesClusterDefaultNodePool, \
KubernetesClusterIdentity, ResourceGroupConfig, AzurermProviderFeatures
@gurayops
gurayops / rastgele.py
Created May 15, 2020 11:51
A pseudo-random number API with Python and Falcon, serving by Gunicorn inside the code.
from gunicorn.app.base import BaseApplication
import falcon
import random
import os
import time
waitTime = int(os.environ.get('WAIT_TIME', '2'))
class RandomGenerator(object):
def on_get(self, request, response):
class Koltuk:
size = '50x50'
class Araba:
depo = 100 # degisken -> property
carType = '4x4'
seats = [Koltuk() for i in range(5)]
def __init__(self, color):
@gurayops
gurayops / GitFlags.csv
Created February 19, 2018 18:46
Git index flags are explained in a blog post using that table
0 0 0 9
0000 0000 0000 1001
Assume valid-extended-stage 12 bit length of filename
@gurayops
gurayops / GitPermissions.csv
Created February 19, 2018 18:00
Git Permission and Object Type Bits
0x 00 00 81 A4
Binary 0000 0000 0000 0000 1000 0001 1010 0100
Meaning 1000 means regular file-000 is unused Previous 1 and these are Unix permissions (644)