Skip to content

Instantly share code, notes, and snippets.

View AOx0's full-sized avatar
:shipit:
School

Alejandro Osornio AOx0

:shipit:
School
View GitHub Profile
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FirewallRule",
"type": "object",
"required": [
"action",
"applies_to",
"matches"
],
"properties": {
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FirewallRule",
"type": "object",
"required": [
"action",
"applies_to",
"matches"
],
"properties": {
@AOx0
AOx0 / mount_qcow2.md
Created May 26, 2024 01:49 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
# Completions for `zig` (https://ziglang.org/)
# Based on version 0.9.1
# This function is based on the `__fish_complete_clang` function.
function __fish_complete_zig_cc_and_cpp
# If the result is for a value, clang only prints the value, so completions
# for `-std=` print `c++11` and not `-std=c++11` like we need. See #4174.
set -l prefix (commandline -ct | string replace -fr -- '^(.*=)[^=]*' '$1')
# first get the completions from clang, with the prefix separated from the value by a comma
@AOx0
AOx0 / A.conf
Last active March 1, 2024 18:04
# This is an example Hyprland config file.
#
# Refer to the wiki for more information.
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
DROP SCHEMA IF EXISTS company CASCADE;
CREATE SCHEMA company;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
SET search_path TO company;
CREATE TABLE job (
id_job UUID NOT NULL DEFAULT gen_random_uuid(),
issue_date DATE NOT NULL DEFAULT date(now()),
name VARCHAR(50) NOT NULL DEFAULT '',
begin
wget https://raw.githubusercontent.com/alacritty/alacritty/master/extra/alacritty.info
sudo tic -xe alacritty,alacritty-direct alacritty.info
end
function set-sleep --argument-names on
if [ "$on" = "on" ]
sudo pmset -b sleep 5; sudo pmset -b disablesleep 0;
echo "Enabled sleep";
else if [ "$on" = "off" ]
sudo pmset -b sleep 0; sudo pmset -b disablesleep 1;
echo "Disabled sleep";
else
echo "Invalid first argument. Should be 'on' or 'off'"
end
#!/bin/zsh
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title kitty
# @raycast.mode silent
# Optional parameters:
# @raycast.icon 🖥️
@AOx0
AOx0 / ksh.fish
Created December 4, 2022 21:11
kitty ssh
function ksh --argument-names args
kitty +kitten ssh -Cx $args
end