Skip to content

Instantly share code, notes, and snippets.

@nmelihsensoy
nmelihsensoy / gstreamer-devel.json
Created February 15, 2025 15:03
Gstreamer 1.25.50 Scoop Manifest
{
"homepage": "https://gstreamer.freedesktop.org/",
"version": "1.25.50",
"description": "Open-source multimedia framework core library development files",
"license": {
"identifier": "LGPL-2.1",
"url": "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/raw/master/COPYING"
},
"architecture": {
"64bit": {
@nmelihsensoy
nmelihsensoy / flash.sh
Created April 30, 2023 07:17
command to flash klipper firmware to atmega2560 based boards using avrdude
avrdude -v -V -patmega2560 -cwiring "-P/dev/cu.usbserial-140" -b115200 -D "-Uflash:w:klipper.hex:i"
# generated by SuperSlicer 2.4 on 2023-04-27 at 08:24:26 UTC
[print:0.20mm NORMAL - Copy]
allow_empty_layers = 0
avoid_crossing_not_first_layer = 1
avoid_crossing_perimeters = 0
avoid_crossing_perimeters_max_detour = 0
bottom_fill_pattern = monotonic
bottom_solid_layers = 4
bottom_solid_min_thickness = 0.5
@nmelihsensoy
nmelihsensoy / package_list.md
Last active November 9, 2024 16:42
My customized package list for OpenWRT firmware selector

https://firmware-selector.openwrt.org/ IPv6 is disabled, LuCi, Tailscale, Wireguard, SQM, Mosquitto are enabled.

base-files busybox ca-bundle dnsmasq dropbear firewall4 fstools kmod-gpio-button-hotplug kmod-leds-gpio kmod-mt7603 kmod-mt76x2 kmod-nft-offload libc libgcc libustream-wolfssl logd mtd netifd nftables odhcp6c opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail uci uclient-fetch urandom-seed urngd wpad-basic-wolfssl kmod-tun ca-bundle tailscaled tailscale luci luci-ssl luci-app-firewall wireguard-tools luci-app-sqm mosquitto mosquitto-client libmosquitto
@nmelihsensoy
nmelihsensoy / .wslconfig
Created June 15, 2022 18:04
My .wslconfig file
[wsl2]
memory=6GB
swap=6GB
# My custom kernel. Source can be found here https://github.com/nmelihsensoy/WSL2-Linux-Kernel
kernel=C:\\WINDOWS\\System32\\lxss\\tools\\mykernel
# Disables the mitigations and creates /sys/block/zram[0-5] block devices.
kernelCommandLine = zram.num_devices=6 noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off
@nmelihsensoy
nmelihsensoy / wsl_adb
Last active February 6, 2022 13:01
wsl adb connection
With using 'usbipd-win':
From Windows(Windows 11) :
usbipd wsl list
usbipd wsl attach --busid <DEVICE_BUSID>
if gives 'WSL Virtual Switch' error :
find interface that Windows and Wsl can ping each other then
From WSL(Ubuntu 20.04) :
usbip list -r <WINDOWS_IP>
sudo usbip attach -r <WINDOWS_IP> -b <DEVICE_BUSID>
@nmelihsensoy
nmelihsensoy / wsl_vpn_fix.txt
Last active January 31, 2022 14:05
fix for no internet in wsl while host connected to wireguard vpn issue
From WSL(Ubuntu 20.04) :
sudo rm -f /etc/wsl.conf && echo "[network]\ngenerateResolvConf = false" >> /etc/wsl.conf
sudo rm -f /etc/resolv.conf && echo "nameserver 1.1.1.1" >> /etc/resolv.conf
sudo chattr +i /etc/resolv.conf
From Host(Windows 11) :
WireGuard [Peer] Config:
AllowedIPs = ::/128, 0.0.0.0/0
netsh interface ipv4 show subinterface
@nmelihsensoy
nmelihsensoy / survey_bypass.css
Created May 29, 2019 12:22
Duzce University SIS Survey Bypass Source Code
/**
Author: Nuri Melih Sensoy
github.com/nmelihsensoy
From : https://userstyles.org/styles/172300/du-sis-survey-bypass
**/
@-moz-document url("https://obs.duzce.edu.tr/student/lessongradebystudent")
{
.portlet-body .alert
{
@nmelihsensoy
nmelihsensoy / Makefile
Last active February 9, 2019 22:14
Makefile for C/C++ App
#
# Project Structure
#
# project_folder
# |
# |_____Makefile
# |
# |_____src
# | |__app.c
# |
@nmelihsensoy
nmelihsensoy / convert.sh
Created August 31, 2018 08:43
Converting Turkish subtitles to UTF-8 Linux Bash Script
#!/bin/bash
#Convert Turkish subtitles to UTF-8
#
for file in *.srt
do
if [ ! -f $file ]; then
echo "Altyazı dosyası bulunamadı. :("
else
charset="$( file -bi "$file"|awk -F "=" '{print $2}')"