Skip to content

Instantly share code, notes, and snippets.

@tomdaley92
tomdaley92 / README.md
Last active April 25, 2024 17:41
Proxmox - Email Alerts Setup (gmail)

Proxmox - Email Alerts Setup (gmail)

  1. SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.

    apt update
    apt install -y libsasl2-modules mailutils
  2. Enable 2FA for the gmail account that will be used by going to security settings

mail.yandex.ru##.ns-view-left-box>:nth-of-type(2)
mail.yandex.ru##.mail-Layout-Content>:nth-of-type(2)
market.yandex.ru##[data-apiary-widget-name="@marketfront/HeaderPromo"]
market.yandex.ru##[data-apiary-widget-name="@marketfront/HeroBannerCarousel"]
market.yandex.ru##[data-apiary-widget-name="@marketfront/MadvHeaderPromo"]
youtube.com##[is-shorts]
docs.nestjs.com##div.banner
habr.com##.tm-stories-block
@Klerith
Klerith / templateSlice.js
Last active April 25, 2024 17:38
Cascaron para crear Redux Slices rápidamente
import { createSlice } from '@reduxjs/toolkit';
export const templateSlice = createSlice({
name: 'name',
initialState: {
counter: 10
},
reducers: {
increment: (state, /* action */ ) => {
//! https://react-redux.js.org/tutorials/quick-start
@ParthaDhar
ParthaDhar / changephp.sh
Last active April 25, 2024 17:37 — forked from qadirpervez/changephp.sh
change php version in cli and for apache
## Switch php version php-cli and in apache
echo
echo -e "\033[1;31m PHP Version changer Switcher\e[0m"
echo
echo -e "\033[0;33m PHP version currently active in your '/cli': \033[0;35m`sudo php -v | head -n 1 | cut -c 1-10` \e[0m" # Checking running php version
sudo sudo service apache2 stop &>- # Stopping lampp stack if running
echo
echo -e "\033[0;31m versions that you have installed:\e[0m"
ls -ldt /etc/php/* | awk '{print $9}'
echo

TL;DR

When Riot Games introduces the Vanguard anti-cheat to League of Legends, you should STOP playing and you should not install the anti-cheat when you get the pop-up. Vanguard is a kernel-level anticheat and these anticheats operate at a privilege level HIGHER THAN YOUR OWN. The anti-cheat can do things that even you can't do, without asking or letting you know. It's like Riot installing a camera in every room of your house and getting a copy of every key inside.

Here is just one example of what they can do: https://www.theregister.com/2013/11/20/esea_gaming_bitcoin_fine/

https://www.wired.com/2013/11/e-sports/

Who am I?

@valteu
valteu / ubuntu_egpu
Created August 1, 2023 16:27
Guide to install nvidia eGpu on ubuntu 22.04
DISCLAIMER
This might break your current partition, no guarantees for any damages these steps might cause
System: MSI summit with i7 1280P, RTX 3070, Razer Core X
1. install nvidia driver:
- sudo apt-get install nvidia-driver-525-open
2. reboot
3. install eGPU switcher:
- download release 0.19.0 egpu-switcher-amd64
- sudo cp Downloads/egpu-switcher-amd64 /opt/egpu-switcher
@darcyparker
darcyparker / vimModeStateDiagram.svg
Last active April 25, 2024 17:28
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mzeryck
mzeryck / mz_invisible_widget.js
Last active April 25, 2024 17:27
A Scriptable script that creates "invisible" widget backgrounds based on your iOS wallpaper, and then either uses them as a Scriptable widget background or exports to your camera roll.
/*
MIT License
Copyright (c) 2022 Maxwell Zeryck
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTW
@sirleech
sirleech / gist:1813307
Created February 13, 2012 03:31
Reinstall Apache2 Ubuntu

To replace configuration files that have been deleted, without purging the package, you can do

sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2.2-common

To fully remove the apache2 config files, you should

sudo apt-get purge apache2.2-common
@vankesteren
vankesteren / idealpoint.R
Created April 25, 2024 15:04
Ideal point model in stan
# Ideal point model in stan / R
# example taken & simplified from https://medewitt.github.io/resources/stan_ideal_point.html
library(tidyverse)
library(cmdstanr)
# simulate data: 100 legislators, 150 votes
set.seed(1834)
N_legislators <- 50
N_bills <- 150