Skip to content

Instantly share code, notes, and snippets.

@zyxar
zyxar / exercise.tour.go
Last active April 28, 2024 17:06
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)
<!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;
@tonyxu-io
tonyxu-io / edge-lite.mobileconfig
Last active April 28, 2024 17:05
Edge Configuration Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadDisplayName</key>
<string>tony-edge-lite</string>
<key>PayloadIdentifier</key>
<string>io.tonyxu.edge-lite</string>
<key>PayloadType</key>
<string>Configuration</string>
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 17:05
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
#!/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:05
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