Skip to content

Instantly share code, notes, and snippets.

View JustLinuxUser's full-sized avatar

Andrii JustLinuxUser

  • Madrid
  • 15:08 (UTC +01:00)
View GitHub Profile
@JustLinuxUser
JustLinuxUser / wireguard_setup.sh
Created June 6, 2024 15:37
Configure wireguard server as a tunnel to connect to the machine (without further connection to the internet)
ussage='Ussage:
First, Thank Andrii Dokhniak, because he is the best!, then
sudo bash wireguard_setup.sh <network interface>
(the network interface is used to get the IP)
Dependencies:
- qrencode, for creating the qrcode
- wireguard-tools, for the userspace wg command
@JustLinuxUser
JustLinuxUser / script.sh
Last active June 13, 2024 20:26
download latest lutris
version=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/lutris/lutris |
grep -v beta |
tail -n1 |
cut -d '/' --fields=3)
version_no_v=$(echo "$version" | tr -d v)
wget "https://github.com/lutris/lutris/releases/download/${version}/lutris_${version_no_v}_all.deb"
[font]
size = 10
[font.bold]
family = "JetBrainsMono Nerd Font"
style = "Bold"
[font.italic]
family = "JetBrainsMono Nerd Font"
style = "Italic"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void ft_advanced_sort_string_tab(char **tab, int (*cmp)(const char *, const char *))
{
int i;
int j;
char *temp;
What to do when you have a Cargo.lock merge conflict?
1. `git checkout origin/main -- Cargo.lock` to get the original Cargo.lock
2. `cargo build` to update Cargo.lock
3. `git add Cargo.lock`
4. continue the merge as normal
<!DOCTYPE html>
<html>
<head>
<title>Accounting with Xander :)</title>
<script src="/assets/htmx.min.js"></script>
<script src="/assets/tailwind.js"></script>
</head>
<body class="flex flex-col justify-center">
<h1>{{w.full_name}}</h1>
<form hx-put="/api/submit_report" hx-target="#result" hx-swap="none">
vim.o.tabstop = 4 -- A TAB character looks like 4 spaces
vim.o.expandtab = false -- Pressing the TAB key will insert spaces instead of a TAB character
vim.o.softtabstop = 0 -- Number of spaces inserted instead of a TAB character
vim.o.shiftwidth = 4 -- Number of spaces inserted when indenting
vim.o.listchars = "tab:⇥ ,eol:󰘌,trail:■"
vim.g.mapleader = " " -- Leader key
vim.o.nu = true
vim.o.rnu = true
vim.o.undofile = true
vim.o.cmdheight = 0
return {
"mfussenegger/nvim-lint",
cmd = function()
BANNED_BUFFS = {};
require("lint").linters_by_ft = {
c = { "norminette" },
}
-- Error: VAR_DECL_START_FUNC (line: 171, col: 1): Variable declaration not at start of function
local pattern = '(Error):%s+([%u_]+)%s+%(line:%s+(%d+),%scol:%s+(%d+)%):%s+(.*)';
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 2024-12-20
// @description try to take over the world!
// @author You
// @match *://www.preciosadictos.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=preciosadictos.com
// @grant none
// ==/UserScript==
package main
import (
"fmt"
"time"
"github.com/gorilla/schema"
)
type TestStruct struct {
Time time.Time