Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
exec "$@"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RPG Game</title>
<style>
body {
margin: 0;
padding: 0;
Mozilla/5.0 (Linux; Android 9; SM-J330FN Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/337.0.0.32.118;]
Mozilla/5.0 (Linux; Android 7.0; FRD-L09 Build/HUAWEIFRD-L09; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/227.0.0.43.158;]
Mozilla/5.0 (iPhone; CPU iPhone OS 14_7 like Mac OS X) WebKit/8611 (KHTML, like Gecko) Mobile/18G69 [FBAN/FBIOS;FBDV/iPhone10,3;FBMD/iPhone;FBSN/iOS;FBSV/14.7;FBSS/3;FBID/phone;FBLC/en_US;FBOP/5]
Mozilla/5.0 (Linux; Android 10; HRY-LX1T Build/HONORHRY-LX1T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/93.0.4577.62 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/333.0.0.30.119;]
Mozilla/5.0 (Linux; Android 10; JSN-L21 Build/HONORJSN-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/94.0.4606.71 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/325.0.0.36.170;]
Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X)
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active April 28, 2024 17:02
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@Zwyx
Zwyx / encrypt.sh
Last active April 28, 2024 17:01
Display detailed information about a password store and reencrypt it
#!/bin/bash
# Created by github.com/Zwyx
# MIT Licence
if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
echo "Usage: ./encrypt.sh [subfolder-name]..."
exit
fi
@sara-hines
sara-hines / regex-html-tag-match.md
Last active April 28, 2024 17:01
Learning Regex Basics: Tutorial for Matching an HTML Tag

Learning Regex: Tutorial for Matching an HTML Tag

Regular Expressions, abbreviated as regex, are a beneficial tool add to one's skill set as a developer. Regex are patterns which match character combinations in strings and which can capture sections of strings for later use. This makes regex valuable for find-and-replace operations, form validation, cleaning input, and reformatting input. Using regex with string methods such as test(), exec(), match(), and replace() can open up new capabilities for working with strings, especially for newer developers. Regular expressions can be created using a regular expression literal, which uses a pattern wrapped in a forward slash (/) before and after the pattern, or by using the Regular Expression constructor function. This article will use a regular expression literal to walk through some of the most fundamental components of regex.

Summary

The following regex pattern matches HTML elements and their tags, whether the element incl

@slingamn
slingamn / against_scram.md
Created August 13, 2021 01:15
Against SCRAM

Against SCRAM

I added support for the SCRAM-SHA-256 authentication mechanism to the Ergo IRC server, in response to demand for a reference implementation that clients could test against. Conversely, if you're implementing a server, I added an irctest server test covering it.

Nonetheless, this decision should not be taken as an endorsement of SCRAM. I recommend against implementing SCRAM-SHA-256 or any other SCRAM variant. Here's why.

The baseline: SASL PLAIN over TLS

@badrelmers
badrelmers / Portable_Virtualbox.md
Last active April 28, 2024 17:01
portable virtualbox using the latest virtualbox installers

This makes virtualbox works in a portable mode:

  • if you have any installed virtualbox then uninstall it first
  • download https://download.virtualbox.org/virtualbox/7.0.8/VirtualBox-7.0.8-156879-Win.exe or any newer or older version
  • click on Download ZIP above to download the scripts needed
  • create a folder inside your USB/external drive or whatever, name it myVMBOX (ex. F:\myVMBOX if your USB is in F:\).
  • inside F:\myVMBOX put the virtualbox exe we just downloaded (VirtualBox-7.0.8-156879-Win.exe) and rename it to VirtualBox.exe.
  • inside F:\myVMBOX put the following files start_virtualbox.bat and uninstall_virtualbox.bat, you will find them inside the zip you just downloaded.
  • now everytime you want to start virtualbox use start_virtualbox.bat.
// Define a class for a character
class Character {
constructor(name, strength, agility, criticalStrikeChance, criticalStrikeBonus, dodge) {
this.name = name;
this.strength = strength;
this.agility = agility;
this.criticalStrikeChance = criticalStrikeChance;
this.criticalStrikeBonus = criticalStrikeBonus;
this.dodge = dodge;
this.health = 100; // Starting health
@ricardojba
ricardojba / windows_hardening.cmd
Last active April 28, 2024 16:59
A Windows hardening script
::##########################################################################################################################
::
:: This script can ruin your day, if you run it without fully understanding what it does, you don't know what you are doing,
::
:: OR BOTH!!!
::
:: YOU HAVE BEEN WARNED!!!!!!!!!!
::
:: This script is provided "AS IS" with no warranties, and confers no rights.
:: Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section,