Skip to content

Instantly share code, notes, and snippets.

View f0xmulder's full-sized avatar
👽
I want to believe

B. Ugur Demirkan f0xmulder

👽
I want to believe
  • Bursa / Turkey
View GitHub Profile
@f0xmulder
f0xmulder / 1 Waybar OpenVPN Toggler
Created September 2, 2024 01:42 — forked from bigfreak85/1 Waybar OpenVPN Toggler
Waybar Plugin openvpn toggler Shellscript for start/stop/status openvpn client (Systemd-unit)
This Scripts and Config Snippets are for a little Symbol in the Waybar. If you Click on the Tunnelsymbol the OpenVPN-Client
establish a Connection to the given Config (Systemd Openvpn-Client). If you do not Need the Tunnel then you can Click again on
the Symbol and the VPN-Tunnel gets closed. The following moving Parts are needed:
1. The Waybar Config Snippit
2. The Toggle/Status Script
3. The Polkit Rule to allow the control of the OpenVPN-Client systemd-Unit by given user (a sudo nopasswd is also possible but
not so granular and allows systemctl completly)
@f0xmulder
f0xmulder / 0-go-os-arch.md
Created January 6, 2023 03:49 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@f0xmulder
f0xmulder / howto.md
Created July 4, 2022 21:49 — forked from d4v3y0rk/howto.md
Encryption with DM_CRYPT in WSL2

Encrypted Volumes in WSL2

Description

This is a quick guide on how to setup dm_crypt under WSL2 for working with encrypted volumes. I use an encrypted volume to store things like password recovery codes and 2nd factor backup codes etc. I recently switched over to using WSL2 and wanted to figure out how to enable this functionality there. This is the distilled howto for getting it to work.

Guide

First thing you have to do is create a custom WSL2 kernel. Inside your already installed and running WSL2 (ubuntu) installation:

  • Install some required packages.
@f0xmulder
f0xmulder / arch-usb-uefi.md
Created January 24, 2020 15:33 — forked from elerch/arch-usb-uefi.md
Installation of Arch Linux on a USB stick with UEFI and legacy BIOS Support

Our goal here is to have one USB stick to rule them all. Objectives:

  • We want a full system - not a live CD
  • We want to boot this system on a Macbook Pro (requires UEFI)
  • We want to boot this system on a Acer C720 Chromebook (requires Legacy BIOS support)
  • We want the system "functional"

The last bullet is subject to interpretation, but I'm defining functional as:

  • X Windows works (with LXDE)
@f0xmulder
f0xmulder / gist:c643a468398906515c09392152ac6c9e
Created August 5, 2019 22:39 — forked from zeuxisoo/gist:1205467
Mini Fake DNS server (Python recipe)
## {{{ http://code.activestate.com/recipes/491264/ (r4)
import socket
class DNSQuery:
def __init__(self, data):
self.data=data
self.dominio=''
tipo = (ord(data[2]) >> 3) & 15 # Opcode bits
if tipo == 0: # Standard query
@f0xmulder
f0xmulder / ip_forward.md
Created February 27, 2018 15:10 — forked from tzermias/ip_forward.md
Forward traffic from wlan0 to eth0 interface

Forward traffic from a laptop's eth0 to wlan0

###To laptop

Specify an IP address to eth0 (here 192.168.56.1)

sudo ifconfig eth0 192.168.56.1 netmask 255.255.255.0
@f0xmulder
f0xmulder / SimpleAuthServer.py
Created October 27, 2017 19:16 — forked from fxsjy/SimpleAuthServer.py
SimpleAuthServer: A SimpleHTTPServer with authentication
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import base64
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''
def do_HEAD(self):
@f0xmulder
f0xmulder / simpleRestfulHttpServerInPython
Created October 27, 2017 19:16 — forked from mafayaz/simpleRestfulHttpServerInPython
Writing Simple HTTP Server in Python (With REST and JSON)
There are many already existing powerful http servers that can be used in python e.g. gevent, twisted web server. However, they are a bit complex to use and you cannot start them in a thread other than the main thread.
Here is a sample of basic http server using "BaseHTTPRequestHandler". The example exposed two rest interfaces:
To ingest records into the web server
To retrieve already ingested records from the web server
The records are assumed to be JSON based, however, any type of records can be ingested.
[sourcecode language="python" wraplines="false" collapse="false"]
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
@f0xmulder
f0xmulder / usb_hid_keys.h
Created September 28, 2017 14:26 — forked from MightyPork/usb_hid_keys.h
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@f0xmulder
f0xmulder / turkce_isimler.sql
Created July 4, 2017 15:44 — forked from ismailbaskin/turkce_isimler.sql
Türkçe isim veritabanı
-- Turkce isimler sozlugu twitter : http://twitter.com/tserpico
CREATE TABLE `isimler` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`isimler` varchar(255) DEFAULT NULL,
`cinsiyet` varchar(255) DEFAULT NULL COMMENT 'erkek : E , kadın : K , uniseks : U',
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
-- ----------------------------