Skip to content

Instantly share code, notes, and snippets.

View Areso's full-sized avatar
🎯
Writing a game for Steam Game Festival

Anton Gladyshev Areso

🎯
Writing a game for Steam Game Festival
View GitHub Profile
@Areso
Areso / change_group_id.sh
Created September 14, 2023 11:44 — forked from CHERTS/change_group_id.sh
Changing GID (gid>1000) to system (gid<1000)
#!/bin/bash
#
# Program: Changing GID (gid>1000) to system (gid<1000) <change_group_id.sh>
#
# Author: Mikhail Grigorev <sleuthhound at gmail dot com>
#
# Current Version: 1.0
#
# Revision History:
@Areso
Areso / curl and cert password.bash
Created September 3, 2022 17:48 — forked from Integralist/curl and cert password.bash
POST data via curl command using CERT and password
curl --verbose \
--header "Content-Type: application/json" \
--request POST \
--data '{"foo":"bar"}' \
--insecure \
--cert $DEV_CERT_P12:{password} \
https://domain.com/path/to/endpoint
------BUILD----------
node {
//rel/release-3.1.4
skipBuildDocker = "Yes"
withCredentials([sshUserPrivateKey(credentialsId: "id_rsa_unlocked", keyFileVariable: 'keyfile')]) {
stage('git clone hadoop') {
if (skipCloneStep=="No") {
sh 'ssh root@${host} "rm -rf /root/hadoop/ && git clone https://github.com/areso/hadoop.git && cd hadoop && git checkout hotfix-3.1.4-1"'
}
}
@Areso
Areso / getfile.sh
Created August 14, 2022 22:46
getfile
curl -L "http://hdfsnamenode.lxd:9870/webhdfs/v1/README2.txt?op=OPEN&user.name=root" | tee README2.txt
@Areso
Areso / putfile.sh
Last active August 14, 2022 23:48
putfile
curl -L -X PUT -T README.txt "http://hdfsnamenode.lxd:9870/webhdfs/v1/README2.txt?op=CREATE&user.name=root"
@Areso
Areso / ipv4.sh
Created August 14, 2022 14:10
ipv4
ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1
@Areso
Areso / core-site.xml
Created August 13, 2022 18:01
core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hdfsnamenode.lxd:9000</value>
</property>
</configuration>
@Areso
Areso / sshuttle.sh
Created March 13, 2022 17:46 — forked from Davor111/sshuttle.sh
How to use sshuttle with .key, .csr or .pem files for authentication
#It's not directly mentioned in the documentation on how to do this, so here you go. This command will tunnel everything including DNS:
sshuttle --dns -vr user@yourserver.com 0/0 --ssh-cmd 'ssh -i /your/key/path.pem'
@Areso
Areso / test
Created February 9, 2022 10:11
test
eyJnb2xkIjo2MjY1LCJnZW1zIjowLCJwb3AiOjQ1MCwic2Vhc29uIjoxLCJ5ZWFyIjoxMzY0LCJmb29kIjoyMCwidHJlYXN1cnlHdWFyZCI6NSwiYnVpbGRMZXZlbEQiOjMsImJ1aWxkTGV2ZWxIIjoxMywiYnVpbGRMZXZlbFRyZWFzdXJ5IjozLCJidWlsZExldmVsR2FsbG93cyI6MCwiYnVpbGRMZXZlbEZvdW50YWluIjoxLCJidWlsZExldmVsU3Rhc2giOjEsImJ1aWxkTGV2ZWxJbm4iOjIsImJ1aWxkTGV2ZWxTdGFibGUiOjIsImJ1aWxkTGV2ZWxBcmNoZXJ5IjoyLCJidWlsZExldmVsU21pdGgiOjAsImZpcmUiOjAsImZpcmVTdGVwcyI6MCwiZmlyZUd1YXJkIjowLCJoZXJvIjowLCJoYXBwaW5lc3MiOjgwLCJvX2F1dG9zYXZlIjoxLCJuZXdTYXZlVmVyc2lvbiI6OCwic2F2ZVZlcnNpb24iOiJzYXZlVjEwMTAiLCJjYXN0bGVYIjoxNiwiY2FzdGxlWSI6NCwiaGVyb1giOjAsImhlcm9ZIjo4LCJtYXBDcmVhdGVkIjoxLCJteU1hcExhbmQiOltbMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDBdLFswLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMF0sWzAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwXSxbMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDBdLFswLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMF0sWzAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwXSxbMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDBdLFswLDAsMCwwLDAsMCwwLDAsMCwwLDAs
@Areso
Areso / systemctl.txt
Created February 8, 2022 09:47
systemctl
systemctl edit --force --full newservicename.service
```
[Unit]
Description=backend
Requires=network.target
[Service]
Type=oneshot
Restart=yes
RestartSec=120