Skip to content

Instantly share code, notes, and snippets.

View Abreto's full-sized avatar
🔋
Charging

Abreto Abreto

🔋
Charging
View GitHub Profile
@Abreto
Abreto / csgo.cfg
Last active December 3, 2023 13:48
bind f "+lookatweapon;r_cleardecals"
alias +jumpthrow "+jump;-attack;-attack2";
alias -jumpthrow -jump;
bind c +jumpthrow;
host_writeconfig
@Abreto
Abreto / aws_create_site.yml
Created January 13, 2023 16:25 — forked from ruzickap/aws_create_site.yml
Ansible playbook which creates instances and tag volumes
---
- name: Create Instance in AWS
hosts: localhost
connection: local
gather_facts: false
vars:
aws_access_key: "xxxxxx"
aws_secret_key: "xxxxxx"
security_token: "xxxxxx"
@Abreto
Abreto / ansible-add-string-to-line.yml
Created January 10, 2023 14:17 — forked from iAugur/ansible-add-string-to-line.yml
Ansible: Add a String to an existing line in a file
# Adapted from solution provided by http://stackoverflow.com/users/57719/chin-huang http://stackoverflow.com/a/31465939/348868
# Scenario: You want to add a group to the list of the AllowGroups in ssh_config
# before:
# AllowGroups Group1
# After:
# AllowGroups Group1 Group2
- name: Add Group to AllowGroups
replace:
backup: yes
@Abreto
Abreto / crystal-disk-mark-fio-bench.sh
Created December 27, 2022 12:55 — forked from O1ahmad/crystal-disk-mark-fio-bench.sh
CrystalDiskMark-esque Disk Benchmark (using fio)
#!/bin/bash
LOOPS=5 #How many times to run each test
SIZE=1024 #Size of each test, multiples of 32 recommended for Q32 tests to give the most accurate results.
WRITEZERO=0 #Set whether to write zeroes or randoms to testfile (random is the default for both fio and crystaldiskmark); dd benchmarks typically only write zeroes which is why there can be a speed difference.
QSIZE=$(($SIZE / 32)) #Size of Q32Seq tests
SIZE+=m
QSIZE+=m
@Abreto
Abreto / .tmux.conf
Last active October 25, 2022 16:45
Tiny custom configurations
set -g default-terminal "screen-256color"
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1hISokP3DcGPVWtqUNZz2A8P/dcT3xAOJBRkJ9YTDT abreto@Abreto-MacBook-Pro.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBuo+T952v/um4lNr98QNv+y6xkJi4vK4mv6pI8ERTNs Termius@abPad
@Abreto
Abreto / docker-compose.yml
Created December 4, 2019 10:11
Run GitLab in Docker (for Mac)
version: "3"
services:
web:
image: 'gitlab/gitlab-ee:latest'
restart: always
hostname: 'Abreto-MacBook-Pro.local'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://Abreto-MacBook-Pro.local:8929'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
@Abreto
Abreto / environment
Last active January 1, 2020 13:39
Use proxy of host-machine
# /etc/environment
ALL_PROXY="http://192.168.98.1:6152"
HTTP_PROXY="http://192.168.98.1:6152"
HTTPS_PROXY="http://192.168.98.1:6152"
SOCKS_PROXY="socks5://192.168.98.1:6153"
NO_PROXY="localhost,127.0.0.0/8,::1,.local,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,100.64.0.0/10"
all_proxy="http://192.168.98.1:6152"
http_proxy="http://192.168.98.1:6152"
https_proxy="http://192.168.98.1:6152"
@Abreto
Abreto / Caddyfile
Last active February 2, 2022 22:44
HTTPS Proxy
<Host> {
# push # (?)
gzip
log / stdout "{combined} | {scheme}://{host} {>Connection} {>Upgrade}"
proxy / [to] {
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
}
forwardproxy {
basicauth <user> <password>
Host * !host1 !host2 !host3 ...
Some options ...