Skip to content

Instantly share code, notes, and snippets.

View unennhexium's full-sized avatar
🌱
𝑙𝑎𝑢𝑟𝑎𝑐𝑒𝑎𝑒 𝑝𝑒𝑟𝑠𝑒𝑎 𝑎𝑚𝑒𝑟𝑖𝑐𝑎𝑛𝑎

nuǝuuɥǝxᴉnɯ unennhexium

🌱
𝑙𝑎𝑢𝑟𝑎𝑐𝑒𝑎𝑒 𝑝𝑒𝑟𝑠𝑒𝑎 𝑎𝑚𝑒𝑟𝑖𝑐𝑎𝑛𝑎
View GitHub Profile
@fufexan
fufexan / accel.py
Created December 9, 2023 17:17
Hyprland custom accel_profile
#!/usr/bin/env python3
# original at https://gist.github.com/yinonburgansky/7be4d0489a0df8c06a923240b8eb0191
# modified for ease of use in Hyprland
# calculation are based on http://www.esreality.com/index.php?a=post&id=1945096
# assuming windows 10 uses the same calculation as windows 7.
# guesses have been made calculation is not accurate
# touchpad users make sure your touchpad is calibrated with `sudo libinput measure touchpad-size`
# import matplotlib.pyplot as plt

Keybase proof

I hereby claim:

  • I am kstepanovdev on github.
  • I am v0570k (https://keybase.io/v0570k) on keybase.
  • I have a public key ASCaRIc01l_-_7Q7mN768YuzDNUpuY4_KIXe9QfAIW7gPAo

To claim this, I am signing this object:

@valinet
valinet / README.md
Last active July 4, 2024 14:34
Get dark command windows all the time in Windows

Case study: Get dark command windows all the time in Windows

TL;DR

  1. Make a copy conhost.exe from System32.
  2. Open it with a hex editor (I use HxD).
  3. In HxD, go to Search - Find - Hex-values.
  4. Search for 881d9e530a004885c07477ff15b32e08009084c0.
  5. In Windows 10 version 2004, replace ff15b32e0800 with 909090909090. If using Windows 10 version 20H2, replace ff15b32e08009084 with 9090909090909090.
  6. Save file and copy it back to System32 (take ownership of original conhost.exe in order to replace it).
  7. Profit!
@leonlaser
leonlaser / ideolog_pattern.txt
Last active July 12, 2024 06:32
[logfmt regex] Split your logfmt logfile into key value pairs #golang #go #regex #regularexpression #logfmt #intellij #ideolog
Message pattern: ^time="(.*)" level=([^\s]+) .*$
Message start pattern: ^time=
Time format: yyyy-MM-dd'T'HH:mm:ssXXX
Time capture group: 1
Serverity capture group: 2
Reference: https://github.com/JetBrains/ideolog/wiki/Custom-Log-Formats
@jerblack
jerblack / tee.go
Last active July 16, 2024 05:20
Golang: Mirror all writes to stdout and stderr in program to log file
package main
import (
"fmt"
"io"
"log"
"os"
)
func main() {
@ekiara
ekiara / using-wget-with-socks-proxy
Last active July 20, 2023 16:46
Using wget with socks proxy
# using-wget-with-socks-proxy
# This should work for everything includeing curl, pip, pipenv, etc
# TLDR: Use proxychains (https://github.com/haad/proxychains)
## INSTALL PROXY CHAINS ##
$ sudo apt update -y
$ sudo apt install proxychains
## EDIT PROXYCHAINS CONFIG ##
@jamesfreeman959
jamesfreeman959 / keepawake.ps1
Last active July 4, 2024 14:59
A very simple PowerShell script to keep a Windows PC awake and make lync think the user is active on the keyboard
# Useful references:
#
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line
# https://ss64.com/vb/sendkeys.html
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
#
# Future enhancements - use events rather than an infinite loop
$wsh = New-Object -ComObject WScript.Shell
while (1) {
@fikovnik
fikovnik / getxkblayout.c
Created February 7, 2018 09:43
Get keyboard layout using X11
// compile with `gcc -I/usr/include getxkblayout.c -lX11 -lxkbfile`
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/XKBlib.h>
#include <X11/extensions/XKBrules.h>
int main(int argc, char **argv) {
Display *dpy = XOpenDisplay(NULL);
@seanh
seanh / html_tags_you_can_use_on_github.md
Last active July 16, 2024 07:17
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active July 10, 2024 00:18
Hyperlinks in Terminal Emulators