Skip to content

Instantly share code, notes, and snippets.

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?

@drmalex07
drmalex07 / getopt-example.sh
Last active May 3, 2024 03:03
A small example on Bash getopts. #bash #getopt #getopts
#!/bin/bash
#
# Example using getopt (vs builtin getopts) that can also handle long options.
# Another clean example can be found at:
# http://www.bahmanm.com/blogs/command-line-options-how-to-parse-in-bash-using-getopt
#
aflag=n
bflag=n
@binhqd
binhqd / remove-systemctl-service.sh
Created May 24, 2018 02:12
Remove systemctl service
sudo systemctl stop [servicename]
sudo systemctl disable [servicename]
#rm /etc/systemd/system/[servicename]
#rm /etc/systemd/system/[servicename] symlinks that might be related
sudo systemctl daemon-reload
sudo systemctl reset-failed
@luansilveira-dev
luansilveira-dev / settings.json
Created May 3, 2024 02:58 — forked from diego3g/settings.json
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@Brugarolas
Brugarolas / AllocaStackAllocator.hpp
Last active May 3, 2024 02:58
AllocaStackAllocator.hpp
/**
* @file AllocaStackAllocator.hpp
* @brief AllocaStackAllocator for fast, temporary allocations on a per-thread basis.
* @author Andrés Brugarolas
*
* The StackAllocator is designed to provide efficient, alloca stack memory allocation
* within a pre-allocated memory block. It supports fast allocation and deallocation,
* caching of frequently used block sizes, and management of free space using an AVL tree.
*/
@SKempin
SKempin / Git Subtree basics.md
Last active May 3, 2024 02:57
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@alexrudall
alexrudall / #ChatGPT Streaming.md
Last active May 3, 2024 02:54
ChatGPT streaming with ruby-openai, Rails 7, Hotwire, Turbostream, Sidekiq and Tailwind!

How to add ChatGPT streaming to your Ruby on Rails 7 app!

This guide will walk you through adding a ChatGPT-like messaging stream to your Ruby on Rails 7 app using ruby-openai, Rails 7, Hotwire, Turbostream, Sidekiq and Tailwind. All code included below!

Alt Text

First, add the ruby-openai gem! Needs to be at least version 4. Add Sidekiq too.

@BrockA
BrockA / waitForKeyElements.js
Created May 7, 2012 04:21
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@slawekzachcial
slawekzachcial / aws-sigv4-ssm-get-parameter.sh
Last active May 3, 2024 02:51
Using CURL to call AWS ReST API, signing request with v4 signature
#!/bin/bash
# Source: https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html
[[ -n "${AWS_ACCESS_KEY_ID}" ]] || { echo "AWS_ACCESS_KEY_ID required" >&2; exit 1; }
[[ -n "${AWS_SECRET_ACCESS_KEY}" ]] || { echo "AWS_SECRET_ACCESS_KEY required" >&2; exit 1; }
readonly parameterName="SlawekTestParam"
readonly method="POST"
@1eedaegon
1eedaegon / readImageFromExcel.js
Last active May 3, 2024 02:51
Read image from excel file using ExcelJS
const ExcelJS = require('exceljs');
const workbook = new ExcelJS.Workbook();
const data = await workbook.xlsx.readFile('./test.xlsx');
const worksheet = workbook.worksheets[0];
for (const image of worksheet.getImages()) {
console.log('processing image row', image.range.tl.nativeRow, 'col', image.range.tl.nativeCol, 'imageId', image.imageId);
// fetch the media item with the data (it seems the imageId matches up with m.index?)
const img = workbook.model.media.find(m => m.index === image.imageId);
fs.writeFileSync(`${image.range.tl.nativeRow}.${image.range.tl.nativeCol}.${img.name}.${img.extension}`, img.buffer);