Skip to content

Instantly share code, notes, and snippets.

View leobrines's full-sized avatar
👽

Leo leobrines

👽
View GitHub Profile
@leobrines
leobrines / aptsources-debian.sh
Created April 19, 2019 16:23
Apt Repositories And Install Programs Debian Example
#!/bin/bash
apt install curl
#
# Writes sources.list in order to add non-free repository
#
DEBIAN_RELEASE=`cat /etc/*-release 2> /dev/null | grep PRETTY_NAME | awk -F "=" {'print $2'} | awk -F "(" {'print $2'} | awk -F ")" {'print $1'}`
sourcesListFile=/etc/apt/sources.list
@leobrines
leobrines / userconfig-bestfps.cfg
Created August 26, 2018 18:59
CS1.6 config for best FPS
// LAUNCH OPTIONS
// -nofbo (makes rendering similar to how it used to be and removes anti-aliasing)
// -noforcemparms (if not used, windows will uncheck "enhanced pointer precision every time you load CS)
// -freq X or possibly -refresh X (sets your refresh rate to X; command was brought back)
// -stretchaspect removes blackbars so you can use a 4:3 aspect ratio resolution in widescreen
// Name
name "255"
// Red stats and fps
@leobrines
leobrines / grok_vi.mdown
Created July 20, 2023 23:45 — forked from nifl/grok_vi.mdown
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)

@leobrines
leobrines / ngrok-install.sh
Created September 28, 2019 17:15
Install ngrok on Linux amd64 (https://ngrok.com/download)
#!/bin/bash
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
rm ngrok-stable-linux-amd64.zip
chmod 755 ngrok
mv ngrok /usr/bin/
@leobrines
leobrines / autofastdl
Created April 4, 2020 20:01
Create a directory with fastdl files for cstrike server (Update 2k20)
#!/bin/bash
# SRCDS Server
# FastDL Creator
# Author : Robin Labadie aka UltimateByte
# Website : http://www.lrob.fr for http://www.mesnie.org
# Version : 1.2
# README
# This script is intended to work only for Valve SRCDS (Source) servers using Daniel Gibbs Linux Game Servers Management script
# It's been tested for Debian 8 but other debian and distros should also work
@leobrines
leobrines / 1v1.cfg
Last active May 30, 2020 15:31
CFG for 1v1 in CS:GO
// CS:GO 1v1 AIM Config
exec gamemode_competitive.cfg
bot_quota "2" // Determines the total number of bots in the game
bot_quota_mode "fill" // Determines the total number of bots in the game
mp_buytime 0 // How many seconds after round start players can buy items for.
mp_do_warmup_period 0 // Whether or not to do a warmup period at the start of a match.
mp_free_armor 1 // Determines whether armor and helmet are given automatically.
@leobrines
leobrines / install-docker-wsl.sh
Last active April 29, 2020 17:37
Install docker on Windows Subsystem for Linux (execute as root)
# You must exec as root
# Sources:
# https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
# https://nickjanetakis.com/blog/docker-tip-73-connecting-to-a-remote-docker-daemon
# https://medium.com/faun/docker-running-seamlessly-in-windows-subsystem-linux-6ef8412377aa
# https://medium.com/@sebagomez/installing-the-docker-client-on-ubuntus-windows-subsystem-for-linux-612b392a44c4
apt update
apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
@leobrines
leobrines / gpedit-install.bat
Created April 23, 2020 15:01
Activate gpedit on Windows
@echo off
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
pause
@leobrines
leobrines / plugins.ini
Last active April 21, 2020 04:33
AMX 1.9 plugins for pugmod
; AMX Mod X plugins
; Admin Base - Always one has to be activated
admin.amxx ; admin base (required for any admin-related)
;admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
; Basic
admincmd.amxx ; basic admin console commands
;adminhelp.amxx ; help command for admin console commands
;adminslots.amxx ; slot reservation
// This file is to register independent modules and dependencies of each entities, usecase, etc.
//
// All this is fiction:
// infrastructure -> External frameworks
// interfaces -> Layer of abstraction of frameworks
//
import serviceLocator from './config/serviceLocator'
serviceLocator.register('webserver', () => { // Generic name