Skip to content

Instantly share code, notes, and snippets.

@milisarge
milisarge / coap-client.c
Last active February 11, 2024 18:23
Coap Client Temperature Test Code
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* coap-client -- simple CoAP client
*
* Copyright (C) 2010--2023 Olaf Bergmann <[email protected]> and others
*
* SPDX-License-Identifier: BSD-2-Clause
*
* This file is part of the CoAP library libcoap. Please see README for terms of
* use.
@milisarge
milisarge / main.go
Last active January 4, 2024 06:06
Talimatci - Farklı dağıtımların paket yapım betiklerini Milis talimat yapısına çevirir.
package main
import (
"fmt"
"io/ioutil"
"net/http"
"os"
"os/exec"
"strings"
"regexp"
@milisarge
milisarge / filebase.py
Created December 17, 2023 15:16
Filebase upload file
#!/bin/env python3
import boto3
import requests
import json
import os
import sys
from botocore.config import Config
s3 = boto3.client('s3')
@milisarge
milisarge / greetd.py
Last active November 19, 2024 10:16
Python Greetd Based Login Manager - CLI
#!/usr/bin/env python3
import sys
import socket, os
import json
soket = os.getenv("GREETD_SOCK")
client = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
client.connect(soket)
@milisarge
milisarge / promtail.yaml
Created August 16, 2022 08:39
promtail config example
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
client:
url: http://${LOKI_SERVER}:${LOKI_PORT}/api/prom/push
@milisarge
milisarge / tmux4p.sh
Created March 23, 2022 06:30
Tmux Dörtlü Panel
#!/bin/sh
tmux new-session -d
tmux split-window -v
tmux split-window -h
tmux swap-pane -D
tmux split-window -h
tmux -2 attach-session -d
@milisarge
milisarge / NPMP.md
Last active March 17, 2022 10:47
Milis Linux üzerinde Nginx+Mariadb+PHP Kurulum

Milis Linux+Nginx+PHP+MariaDB+PostgreSQL (NPMP) Kurulumu

Nginx Kurulumu

Nginx paketinin kurulması

mps kur nginx

Nginx servisinin eklenmesi

servis ekle nginx
@milisarge
milisarge / dirtypipe.c
Created March 14, 2022 18:39
Dirtypipe Zaafiyet
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright 2022 CM4all GmbH / IONOS SE
*
* author: Max Kellermann <[email protected]>
*
* Proof-of-concept exploit for the Dirty Pipe
* vulnerability (CVE-2022-0847) caused by an uninitialized
* "pipe_buffer.flags" variable. It demonstrates how to overwrite any
* file contents in the page cache, even if the file is not permitted
@milisarge
milisarge / virt-manager.md
Last active February 18, 2022 19:31
Virt-Manager Notlar

Sanal makina yönetimi için kullanılan bir uygulama da libvirt tabanlı virt-manager uygulamasıdır. Kurulum ve yapılandırma için aşağıdaki adımları uygulanmalıdır.

Kurulum

[ ~ ]# mps kur virt-manager

Servis İşlemleri

@milisarge
milisarge / qemu-virtual-bridge.md
Last active February 6, 2022 15:31
Qemu sanal köprülü ağ kurma

Aşağıda yer alan komutlar sanal bir qemu köprülü ağı kurmak içindir. Ana bilgisayar koşuğlara sanal ip aralığı üzerinden erişebilir.

gerekli uygulamalar

qemu, vde2, dnsmasq

qemu-vde.sh vde tap ağı kurmak için gerekli betik

#!/bin/sh
# QEMU/VDE network environment preparation script