Skip to content

Instantly share code, notes, and snippets.

View 40a's full-sized avatar

40a

View GitHub Profile
@daehahn
daehahn / wsl2-network.ps1
Last active April 21, 2025 03:30
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
data_dir = "/var/lib/vector"
# ------------------ SYSLOG message pipe ------------------ #
[sources.syslog_pipe_in]
type = "socket"
mode = "udp"
address = "127.0.0.1:3333"
[transforms.syslog_pipe_parsing]
@rbatty19
rbatty19 / Windows 10 Optimization Script.ps1
Last active April 7, 2025 15:44
Windows 10 Optimization Script
### Rober19 version
######
# Win10 Optimization Script With Extra GPD Win Tweaks
# Adapted version of https://github.com/Disassembler0/Win10-Initial-Setup-Script by Disassembler <[email protected]>
# Author: BlackDragonBE
# Version: v2.2.1 (2017-12-02)
# Copied from https://www.reddit.com/r/gpdwin/comments/6ipa6c/windows_10_optimization_script_for_gpd_win/
##########
# As a workaround for disabled script execution, run this command (without #) in an elevated PowerShell windows first and choose "all" if you're asked where to apply this:
@haproxytechblog
haproxytechblog / haproxy-config-2-0.cfg
Created June 13, 2019 20:41
HAProxy 2.0 configuration
#
# This is the ultimate HAProxy 2.0 "Getting Started" config
# It demonstrates many of the features available which are now available
# While you may not need all of these things, this can serve
# as a reference for your own configurations.
#
# Have questions? Check out our community Slack:
# https://slack.haproxy.org/
#
@alexanderilyin
alexanderilyin / README.md
Created November 15, 2018 00:58
Auto-increment Minor Semantic Version using Docker Hub API v2

For example your latest image with semantic versioning looks like this:

${DOCKER_HUB_ORG}/${DOCKER_HUB_REPO}:v1.20.0

Example provided above will do the folowing:

  1. Generate token using your github username and password.
  2. Get list of all tags from repository.
@dmitrygusev
dmitrygusev / Dockerfile
Last active October 4, 2018 13:28
Jenkins in Docker
FROM jenkins/jenkins:2.138.1
USER root
RUN apt-get update -y && apt-get install -y \
python-pip \
sudo
RUN pip install awscli --upgrade
@lananovikova10
lananovikova10 / teamleadconf.md
Last active June 5, 2024 11:38
additional materials from teamlead conf

Тут живут драконы. Матрица навыков как инструмент тимлида

Другие варианты матриц для команд разработки

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

@HSPDev
HSPDev / AllowSSHFromIP.php
Created July 2, 2018 22:56
Complementary code and IAM policy for "You don't need that Bastion host"
<?php
// For laravel 5 based systems
// /path/to/project/app/Console/Commands/AllowSSHFromIP.php
namespace App\Console\Commands;
use Aws\Ec2\Ec2Client;
use Carbon\Carbon;
use Illuminate\Console\Command;
@endofcake
endofcake / cfn.tf
Created May 23, 2018 08:45
Auto Scaling group managed in CloudFormation and wrapped in Terraform
resource "aws_cloudformation_stack" "autoscaling_group" {
name = "${var.cfn_stack_name}"
template_body = <<EOF
Description: "${var.cfn_stack_description}"
Resources:
ASG:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
VPCZoneIdentifier: ["${join("\",\"", var.subnets)}"]