Skip to content

Instantly share code, notes, and snippets.

View aamaanaa's full-sized avatar
💻
𝚆𝚊𝚝𝚌𝚑𝚒𝚗𝚐 𝚊𝚗𝚒𝚖𝚎

aamaanaa

💻
𝚆𝚊𝚝𝚌𝚑𝚒𝚗𝚐 𝚊𝚗𝚒𝚖𝚎
  • The multiverse
View GitHub Profile
@alexedwards
alexedwards / cache.go
Last active June 4, 2024 08:01
Generic in-memory cache implementation in Go
package cache
import (
"sync"
"time"
)
// Cache is a basic in-memory key-value cache implementation.
type Cache[K comparable, V any] struct {
items map[K]V // The map storing key-value pairs.
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active June 30, 2024 08:29
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@aamaanaa
aamaanaa / gist:20a55dcf98b094583196c662b03f7bbe
Created October 27, 2022 12:03
Linux write access to /var/www/html/project
You will need to add you user to the 'apache' group first. Log out afhter you have done that.
$ sudo mkdir /var/www/html/project
$ sudo chown -R $USER:apache /var/www/html/project
$ sudo chmod -R 775 /var/www/html/project
@vwbusguy
vwbusguy / auto-profile-update.sh
Last active May 23, 2024 19:40
Auto Update for power-profiles-daemon
#!/bin/bash
dbus-monitor --system "type='signal',path='/org/freedesktop/UPower/devices/battery_BAT0',member='PropertiesChanged'" | while read LINE; do
echo ${LINE} | grep battery_BAT0 | grep -q PropertiesChanged
if [ $? -eq 0 ]; then
BATT_STAT=$(dbus-send --print-reply=literal --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.DBus.Properties.Get string:org.freedesktop.UPower.Device string:State | awk '{ print $3; }')
if [ $BATT_STAT -eq 1 ] || [ $BATT_STAT -eq 4 ]; then
LEVEL=$(powerprofilesctl list | grep -q performance && echo "performance" || echo "balanced")
elif [ $BATT_STAT -eq 5 ]; then
LEVEL="balanced"