Skip to content

Instantly share code, notes, and snippets.

View oguzhancoskun's full-sized avatar
🏠
Working from home

Oguzhan oguzhancoskun

🏠
Working from home
View GitHub Profile
@oguzhancoskun
oguzhancoskun / cdc
Created March 26, 2025 11:36
AWS EKS Cilium Prefix Delegation Checker
#!/bin/bash
# Colors and styles
BOLD='\033[1m'
DIM='\033[2m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
@oguzhancoskun
oguzhancoskun / ec2MetadataJsonWrapper.py
Created August 3, 2023 16:12
ec2 metadata json wrapper
import requests
import json
def get_instance_metadata():
metadata_url = "http://169.254.169.254/latest/meta-data/tags/instance"
res = requests.get(metadata_url)
data_list = res.text.split()
data_dict = {}
for item in data_list:
@oguzhancoskun
oguzhancoskun / wp_role_permissions_by_cat.php
Last active June 26, 2023 15:36
wordpress_role_permission_management
<?php
/*
This script generate custom editors for specific categories, editors just list, view and publish to specific categories
*/
function create_custom_editor_roles($editor_categories) {
foreach ($editor_categories as $editor => $category) {
$role_slug = sanitize_title($editor) . '_editor';
$role_name = ucwords($editor) . ' Editor';
@oguzhancoskun
oguzhancoskun / viscocity-cli.sh
Created November 4, 2019 12:07
usage: viscocity.sh connect [vpnname]
#!/usr/bin/env bash
#Oguzhan Coskun <[email protected]>
display_usage() {
echo "connect <connection name> Open the given connection"
echo "connect all Open all the connections"
echo "disconnect <connection name> Close the given connection"
echo "disconnect all Close all the connections"
echo "ls List all the configured connections"
echo "connections Display ongoing connections"
@oguzhancoskun
oguzhancoskun / graylog-apache.json
Last active March 9, 2017 05:50
Graylog Apache Extractor
{
"extractors": [
{
"condition_type": "none",
"condition_value": "",
"converters": [
{
"config": {},
"type": "numeric"
},