Skip to content

Instantly share code, notes, and snippets.

View kiprasmel's full-sized avatar

Kipras Melnikovas kiprasmel

View GitHub Profile
#include <sourcemod>
public Plugin myinfo = {
name = "Get IP",
author = "Kipras Melnikovas (https://kipras.org) <kipras@kipras.org>",
description = "Get an IP address of a target",
version = "0.1.0",
url = "https://kipras.org"
};
#include <sourcemod>
#include <sdktools> /** ForcePlayerSuicide */
public Plugin myinfo = {
name = "Anti-respawn on reconnect",
author = "Kipras Melnikovas (https://kipras.org) <kipras@kipras.org>",
description = "Disallow clients from respawning after being spawned and reconnecting",
version = "0.1.0",
url = "https://kipras.org"
};
@kiprasmel
kiprasmel / autoexec.cfg
Last active September 21, 2025 22:00
csgo cfg
//-- Autoexec --
// Jumpy Jumpy Throw! Opie OP
alias "+VeryGoodBind" "+jump;-attack;-attack2"
alias "-VeryGoodBind" "-jump"
//bind "x" "+VeryGoodBind"
@kiprasmel
kiprasmel / deploy.sh
Created January 18, 2021 17:03
simple docker deploy.sh
#!/usr/bin/env bash
USER="kipras"
NAME="turbo-schedule"
TAG="$1"
[ -z "$TAG" ] && TAG="latest"
docker stop "$NAME"
docker rename "$NAME" "$NAME".old
@kiprasmel
kiprasmel / iptables_reset.sh
Last active February 9, 2021 14:42
iptables_reset.sh - whitelist must-haves, block everything else 🥳
#!/usr/bin/env sh
# iptables_reset.sh
# get via e.g. curl ifconfig.me
MY_LOCAL_IP=""
[ -z "$MY_LOCAL_IP" ] && {
printf "
usage:
add your local ip inside to the script, then
@kiprasmel
kiprasmel / stdin.cpp
Last active February 4, 2021 21:08
stdin parsing with simple streams
#include <bits/stdc++.h>
using namespace std;
int main() {
// replace this with `cin` or `ifstream` or whatever)
stringstream ss("ayyy lmao asd_qwe: 69, 420,1337, nice yo\nhehe xd: 1, 2, 3, kekw pog");
string a, b, c;
getline(ss, a, ' '); // ayyy (till space)
getline(ss, b, ' '); // lmao (till space)
bindsym $mod+h focus left
bindsym $mod+Shift+h move left 30
bindsym $mod+j focus down
bindsym $mod+Shift+j move down 30
bindsym $mod+k focus up
bindsym $mod+Shift+k move up 30
bindsym $mod+l focus right
const doFoo = ({ a = 10, b, c } = {}) => {
console.log(a, b, c);
};
doFoo(); // a 10 b undefined c undefined
doFoo({ b: 20 }); // a 10 b 20 c undefined
// /\ a still with default value!
@kiprasmel
kiprasmel / rename.js
Created October 10, 2021 20:19
rename.js - experiments w/ `git mv` et al
#!/usr/bin/env node
const fs = require("fs");
const { spawn, exec } = require("child_process");
const path = require("path");
const { snakeCase, pascalCase } = require("/Users/kiprasmelnikovas/.local/share/yarn/global/node_modules/change-case");
// const {pipe} =require( "/Users/kiprasmelnikovas/.local/share/yarn/global/node_modules/fp-ts")
// // git status --short | grep '^[RAD]' > status
/*
.mtk3, .mtk6 {
color: #61e2ff;
text-shadow: 0 0 2px #001716, 0 0 5px #03edf933, 0 0 10px #ffff6633;
}
.mtk3.mtki {
font-style: italic;
color: #9963ff99;
}