Skip to content

Instantly share code, notes, and snippets.

View 0x1881's full-sized avatar
🎯
Focusing

Mehmet Can 0x1881

🎯
Focusing
View GitHub Profile
@0x1881
0x1881 / .env.example
Created September 1, 2026 12:16
docker + omniroute + cloudflared
JWT_SECRET=CHANGE_ME
INITIAL_PASSWORD=CHANGE_ME
API_KEY_SECRET=CHANGE_ME
STORAGE_ENCRYPTION_KEY=CHANGE_ME
MACHINE_ID_SALT=CHANGE_ME
BASE_URL=https://CHANGE_ME
CF_TUNNEL_TOKEN=CHANGE_ME
#!/bin/bash
#set -e
# ============ 平台检测 =============
detect_platform() {
case "$(uname -s)" in
Darwin)
OS="macOS"
SHA_TOOL="shasum"
OPEN_CMD="open"
#!/bin/bash
set -eux
export DEBIAN_FRONTEND=noninteractive
apt update
apt -y upgrade
apt install -y \
curl wget git unzip htop btop \
@0x1881
0x1881 / rector.php
Created April 4, 2026 22:32
rectorphp config for laravel 12-13 + php 8.5
<?php
declare(strict_types=1);
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;
use Rector\ValueObject\PhpVersion;
use RectorLaravel\Set\LaravelLevelSetList;
use RectorLaravel\Set\LaravelSetList;
@echo off
title Windows Sistem Onarimi ve Temizligi by 0x
color 0A
:: YONETICI OLARAK CALISTIGINDAN EMIN OL
net session >nul 2>&1
if %errorlevel% neq 0 (
echo Bu scripti YONETICI olarak calistirman gerekiyor.
pause
exit
<?php
require_once "vendor/autoload.php";
use Amp\Websocket\Client\WebsocketHandshake;
use Amp\Websocket\WebsocketMessage;
use function Amp\Websocket\Client\connect;
class Logger
{
<?php
require_once "vendor/autoload.php";
use Amp\Websocket\Client\WebsocketHandshake;
use Amp\Websocket\WebsocketMessage;
use function Amp\Websocket\Client\connect;
// ---- Config ----
$SYMBOL = "BINANCE:BTCUSD";
@0x1881
0x1881 / changer.sh
Last active June 13, 2024 13:39
changer file and string
#!/bin/bash
echo "Hangi işlemi yapmak istiyorsunuz?"
echo "1 - Dosya içinde isim değişikliği."
echo "2 - Dosya ve dizin isim değişikliği."
echo "3 - Dosya indirme ve değiştirme."
read -p "Seçiminiz: " choice
if [ $choice -eq 1 ]; then
echo "Bu komut ile belirttiğiniz dizin altındaki bütün dosyalarda metinler X değerinden Y değerine değiştirilecektir."
<?php
class CaseBuilder {
private $conditions = [];
public function plain($plain)
{
if(is_string($plain)) $this->conditions[] = $plain;
if(is_array($plain)) $this->conditions = array_merge($this->conditions, $plain);
return $this;
@0x1881
0x1881 / avd-prepare-first-time.sh
Created May 8, 2024 12:30 — forked from sleekweasel/avd-prepare-first-time.sh
Bash/adb automation for setting up avds
#!/bin/bash
uidump=/tmp/${0##*/}.$$
unsyncd_uidump_matching_lines() {
adb shell 'rm -f /sdcard/dump.* && uiautomator dump /sdcard/dump.xml 2>/sdcard/dump.err && cat /sdcard/dump.xml' |
tr '<' "\n" |
tee $uidump.full |
grep -Ei "$1" |
xargs -rn1 |