Skip to content

Instantly share code, notes, and snippets.

View hueychen27's full-sized avatar
๐Ÿ˜€
ehehe

hueychen27

๐Ÿ˜€
ehehe
  • very much North Korea
  • 01:12 (UTC -07:00)
View GitHub Profile
@pencil
pencil / RandomSort.java
Last active July 6, 2025 06:37
Random Sort (bogosort, stupid sort) implementation in Java
public class RandomSort {
public RandomSort(int[] i) {
int counter = 0;
System.out.println("I'll sort " + i.length + " elements...");
while (!isSorted(i)) {
shuffle(i);
counter++;
}
System.out.println("Solution found! (shuffled " + counter + " times)");
@moehlone
moehlone / make_writable.js
Created March 17, 2016 08:27
Make JavaScript readonly propertys writable (example for overwriting navigator.userAgent; useful for unit tests -> browser detection)
/**
* Creates a read/writable property which returns a function set for write/set (assignment)
* and read/get access on a variable
*
* @param {Any} value initial value of the property
*/
function createProperty(value) {
var _value = value;
/**
@mcnesium
mcnesium / gnu_getopt_example.sh
Last active July 4, 2025 04:27 — forked from bobpaul/gnu_getopt_example.sh
An example showing how to use getopt
#!/usr/bin/env bash
# Time-stamp: <2017-04-27 09:57:21 kmodi>
# Time-stamp: <2018-03-20 12:58:02 bobpaul>
# derived from kmodi's gist: https://gist.github.com/kaushalmodi/74e9875d5ab0a2bc1010447f1bee5d0a
#
# Example of using getopt to parse command line options
# http://stackoverflow.com/a/29754866/1219634 Limitation: All the options
# starting with - have to be listed in --options/--longoptions, else getopt will
# error out.
# The downside is that if you intend to use this as a wrapper to some other program,

Debian Trixie and the New deb822 Format for APT Sources

Introduction

Since February 2025, Debian 13 (Trixie) and APT introduced the deb822 format for managing APT sources. This new format replaces the traditional /etc/apt/sources.list file with the more structured and readable /etc/apt/sources.list.d/debian.sources file.

This change was introduced by APT, starting with an update that enabled users to run:

apt modernize-sources

This command automatically converts the old sources.list format to the new deb822 format.

@unixfox
unixfox / README.md
Created May 27, 2025 16:45
I'm leaving the SearXNG project.

Back in April 2021, after a lot of organizational issues regarding the code-review process within the SearX project. Alex (dalf) and I forked the project to create SearXNG. We got Markus (return42), who also wanted to join along for the ride, he was also an active SearX contributor.

The gain of popularity of the project was slow but steady, we positioned ourselves by saying we are a more actively maintained version of SearX because we fixed the engines faster than SearX (core feature of SearX(NG)). We even got ourselves a section in SearX readme about a controversial difference between SearX and SearXNG.

I won't lie, being a maintainer of both project, has