Skip to content

Instantly share code, notes, and snippets.

@wasare
wasare / syslinux.cfg
Created September 29, 2017 04:48 — forked from Sitwon/syslinux.cfg
Boot menu for Slax 7 (my shortened version)
UI /slax/boot/vesamenu.c32
PROMPT 0
TIMEOUT 40
MENU CLEAR
MENU HIDDEN
MENU HIDDENKEY Enter default
MENU BACKGROUND /slax/boot/bootlogo.png
#This script was written by REXOVAS to automate 90% of a ZEN Secure Node setup process for an IPv4 node.
#Parts of this script were adapted from a script by github user rnkhouse
#rnkhouse script found here: https://gist.github.com/rnkhouse/f7f04f0cb10b596e2c6623275968a220
#Prior to running this script, please ensure that you are not signed in as root, and have completed all steps up until the copying
#of authentication key pairs in this guide: https://blockoperations.com/build-zencash-secure-node-part-1-prepare-vps/
#This script performs all actions described in the 3 guides found on blockoperations.com. It compiles zend from source.
#This script installs both Monit and PM2 and automatically configures monit to monitor zend.
#WARNING: This script is intended for use by advanced Linux users. Please read through this script thoroughly to ensure that
@wasare
wasare / signing-vbox-kernel-modules.md
Created July 3, 2020 10:32 — forked from reillysiemens/signing-vbox-kernel-modules.md
Signing VirtualBox Kernel Modules

Signing VirtualBox Kernel Modules

These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].

  1. Install the VirtualBox package (this might be different for your platform).
    src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
@wasare
wasare / TopicsSelection.php
Created November 1, 2022 14:14 — forked from hussainweb/TopicsSelection.php
/web/modules/custom/axl_ks_topics/src/Plugin/EntityReferenceSelection/TopicsSelection.php
<?php
namespace Drupal\axl_ks_topics\Plugin\EntityReferenceSelection;
use Drupal\Component\Utility\Html;
use Drupal\Core\Database\Connection;
use Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginBase;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\Query\QueryInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@wasare
wasare / _base.html
Last active October 22, 2023 15:16
Django Framework do Zero - Templates HTML
{# Curso Django Framework do Zero: https://www.youtube.com/playlist?list=PLFOqHo8oIjzewcT23HCxJV0xWO451CTJe #}
{% load static %} {# carrega a pasta / localização dos arquivos estáticos #}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
{% block head_title %}{% endblock %} {# bloco de título #}
</title>
@wasare
wasare / admin.py
Last active October 22, 2023 15:15
Django Framework do Zero - Área Administrativa com model CustomUser (campos: cpf + data_nascimento)
# accounts/admin.py
# Curso Django Framework do Zero: https://www.youtube.com/playlist?list=PLFOqHo8oIjzewcT23HCxJV0xWO451CTJe
from django.conf import settings
from django.contrib import admin, messages
from django.contrib.admin.options import IS_POPUP_VAR
from django.contrib.admin.utils import unquote
from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.forms import (
AdminPasswordChangeForm,
UserChangeForm,