Skip to content

Instantly share code, notes, and snippets.

@BoGnY
BoGnY / README.md
Last active May 7, 2024 07:02
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify
@declank
declank / Server.java
Created December 17, 2014 15:07
[Java] Simple multi-threaded ServerSocket implementation.
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class Server implements Runnable {
private volatile boolean isStopped;
private ServerSocket serverSocket;
private final ExecutorService threadPool = Executors.newCachedThreadPool();
@wojteklu
wojteklu / clean_code.md
Last active May 7, 2024 07:01
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

Enable & Using vGPU Passthrough

This gist is almost entirely not unlike Derek Seaman's awesome blog:

Proxmox VE 8: Windows 11 vGPU (VT-d) Passthrough with Intel Alder Lake

As such please refer to that for pictures, here i will capture the command lines I used as i sequence the commands a little differently so it makes more logic to me.

This gists assumes you are not running ZFS and are not passing any other PCIE devices (as both of these can require addtional steps - see Derek's blog for more info)

This gist assumes you are not running proxmox in UEFI Secure boot - if you are please refer entirely to dereks blog.

@jeffcjohnson
jeffcjohnson / set-jetbrains-inotify.sh
Last active May 7, 2024 06:59
IntelliJ / PyCharm / JetBrains - Increase inotify watch limit
echo "fs.inotify.max_user_watches = 524288" | sudo tee --append /etc/sysctl.d/60-jetbrains.conf
sudo sysctl -p --system
@darren
darren / rtp_http.go
Last active May 7, 2024 06:59
最简单的Go代码实现联通的iptv转换为HTTP流, 实现类似udpxy的功能
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"os"
"strings"
@davidteren
davidteren / nerd_fonts.md
Last active May 7, 2024 06:59
Install Nerd Fonts via Homebrew [updated & fixed]
@Kevin-De-Koninck
Kevin-De-Koninck / Get_current_real-time_travel_time.py
Created May 14, 2017 19:24
Get current real-time travel time using Python and Google's distance matrix
#!/usr/bin/python
# This script wil get the real-time travel time between your home and your work (in both directions at the current time).
#
# You could use this script to map the real time travel times of the past day (cron job, every minute)
# To plot grpahs you could use: http://plot.ly
#
#
# If you want to plat the estimated driving times for each minute of a given day in the future, check out my gist:
# Get estimated travel times using Python and Google's distance matrix
#!/bin/bash
# Fix intel color corruption
# might come with some performance degradation but is better than a corrupted
# color image
export INTEL_DEBUG=norbc
# Some environment variables by default (taken from Deck session)
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
@rondhi
rondhi / README.md
Last active May 7, 2024 06:55
How to stream games from OBS directly from Steam Deck's Gaming Mode

How to stream games from OBS directly from Steam Deck's Gaming Mode (as of 2023-02-26)

DISCLAIMER: As with any guide, please make sure to read through and understand everything before following the steps in this guide. I'm not responsible for you breaking anything on your own device. This guide assumes you have a little background with the linux command line as well as the text editor nano. If not, please educate yourself


Description: It's possible to stream Vulkan and OpenGL games from Gaming Mode on your Steam Deck. This guide is heavily based on robertkirkman's guide, which is linked multiple times throughout this guide. Much thanks to them