Skip to content

Instantly share code, notes, and snippets.

@f9n
f9n / unbound-cheat-sheet.md
Last active January 13, 2025 15:35
Unbound Cheat Sheet

Unbound Cheat Sheet

Installation

$ yum install -y unbound

Setup SSL keys for unbound-control

@adrienne
adrienne / mullenweg-wpe.md
Last active January 13, 2025 15:34
The Mullenweg/WPE Thing
@marckohlbrugge
marckohlbrugge / assistant.rb
Created January 12, 2025 22:56
Overview of my LLM-powered prototype. Very rough code.
# Add these gems to your Gemfile
gem "rails" # not strictly needed, but I use ActiveConcern, etc
gem "raix" # helpful gem to reduce code needed for function calling etc
gem "thor" # to make a CLI app (not needed if you make a web app)
gem "http" # my preferred gem to make API calls
# This is the main app (`app/models/ai_chat/cli.rb`)
module AIChat
class Cli
# Thor
@lupyuen
lupyuen / zig-termux.md
Last active January 13, 2025 15:31
Install Zig in Termux Android

Install Zig in Termux Android

Here are the steps to install Zig Compiler in Termux Android...

Install Termux from F-Droid, because the Google Play version is outdated...

Launch Termux on Android and enter...

@fardjad
fardjad / taming-an-onyx-tablet.md
Last active January 13, 2025 15:25
[Taming an Onyx Tablet] The documented process of securing my Onyx Boox tablet #blog #onyx #boox

Taming an Onyx Tablet

Onyx tablets reportedly phone home and send "data" to some servers in China. The manufacturer apparently refuses to publish the source-code modifications to the OS and the open-source apps they are using and they even go as far as violating GPL.

Of course I learned all that after buying this tablet. To ease my mind, I spent some time debloating it and then blocked the outgoing traffic to

@Crocoblock
Crocoblock / jfb-call-hook.php
Last active January 13, 2025 15:24
JetFormBuilder Call Hook action
<?php
add_action( 'jet-form-builder/custom-action/test-hook', function( $request, $action_handler ) {
//get value of field field1
$value = $request['field1'];
//or using jet_fb_context()->resolve_request()
$value = jet_fb_context()->resolve_request()['field1'];
# pip install webdriver_manager
# pip install selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
@Crocoblock
Crocoblock / code.php
Last active January 13, 2025 15:24
JetEngine Change wrapper tags to <ul> <li> in Listing Grid
<?php
class JEC_Change_Tags {
public function __construct() {
add_filter( 'jet-engine/listing/render/jet-listing-grid/settings', array( $this, 'apply_settings' ) );
add_filter( 'jet-engine/listing/grid/nav-widget-settings', array( $this, 'nav_settings' ), 10, 2 );
add_filter( 'jet-engine/listing/render/default-settings', array( $this, 'default_settings' ) );
}
@probonopd
probonopd / Wayland.md
Last active January 13, 2025 15:23
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@chahuja
chahuja / split_join_files.md
Last active January 13, 2025 15:23
Split files to parts or equal sizes and then stitch them back

Split a tar/zip file to multiple parts of size 1GB

split -b 1024m filename.tar.gz 'filename.tar.gz.part-'

Combine the split files to a single unit

Linux

cat filename.tar.gz.part-* &gt; filename.tar.gz