Skip to content

Instantly share code, notes, and snippets.

@Erutan409
Erutan409 / gitlab.rb
Last active May 3, 2024 03:16
Gitlab Nginx Reverse Proxy Configuration (with Let's Encrypt SSL)
# These are fragments of the configuration that will need to be updated
# ---
## GitLab URL
##! URL on which GitLab will be reachable.
##! For more details on configuring external_url see:
##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
external_url 'https://gitlab.your-fqdn.com'
#external_url 'http://gitlab.internal.lan'

Naming Controllers

Controllers should be in singular case, no spacing between words, and end with "Controller".

Also, each word should be capitalised (i.e. BlogController, not blogcontroller).

For example: BlogController, AuthController, UserController.

Bad examples: UsersController (because it is in plural), Users (because it is missing the Controller suffix).

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?

@krisbolton
krisbolton / fix-USB-showing-up-as-two-partitions.md
Last active May 3, 2024 03:11
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows

How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:

  1. Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
  2. In the Powershell interface type diskpart to enter the disk partition tool.
  3. Type list disk to see all disks listed.
  4. Select the USB drive by typing select disk [NUMBER]. Be careful to select the correct drive.
  5. Type clean. An error will occur if you have the drive folder open, close the window and repeat the command if this happens.
  6. Type create partition primary.
  7. Type format fs=ntfs quick to format the drive (you can also choose to set fs=fat32).
  8. Type active.
@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.
*/