Skip to content

Instantly share code, notes, and snippets.

View hueychen27's full-sized avatar
🤪
ehehe

hueychen27

🤪
ehehe
  • very much North Korea
  • 22:08 (UTC -07:00)
View GitHub Profile
@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

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.

@mcnesium
mcnesium / gnu_getopt_example.sh
Last active July 28, 2026 11:58 — 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,
@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;
/**
@develhox
develhox / switchs.h
Last active August 19, 2026 08:32
Switch operand implementation for the strings
/*
Copyright 2015 Andrea Carron
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
@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)");