Skip to content

Instantly share code, notes, and snippets.

@bearlike
bearlike / clear_systemd_journal_logs.md
Created March 8, 2022 07:59
Clear Systemd Journal Logs in Ubuntu 20.04

Clear Systemd Journal Logs in Ubuntu 20.04

Systemd has its own logging system called the journal, and the log files are stored in /var/log/journal.

Check current disk usage of journal files

sudo journalctl --disk-usage

Rotate journal files

  • Active journal files will be marked as archived, so that they are never written to in future.

Have you ever wanted to do:

SELECT * FROM www.google.com

With BigQuery you kind of can. But have you ever wanted to do:

SELECT * FROM www.wikipedia.com

With Wikidata Query Service you kind of can (semantic web!, RDF!?, https://www.w3.org/wiki/SparqlImplementations).

@Peregrinox
Peregrinox / jdownloader on osmc.md
Last active May 2, 2024 11:04
install of jdownloader headless

after installing java:

sudo apt-get install libjna-java

Now, download and install jdownloader:

mkdir jd2
cd jd2
@taskylizard
taskylizard / fmhy.md
Last active May 2, 2024 11:04
/r/freemediaheckyeah, in one single file (view raw)
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active May 2, 2024 11:04
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 2, 2024 11:02
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@rponte
rponte / using-uuid-as-pk.md
Last active May 2, 2024 11:01
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 2, 2024 11:00
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@Buravo46
Buravo46 / sample_1.cpp
Last active May 2, 2024 10:57
【DXLib】画像をコマ送りアニメーションするプログラム。
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )
{
ChangeWindowMode(TRUE);
int GHandle[ 4 ] ;
int i ;
if( DxLib_Init() == -1 ) // DXライブラリ初期化処理