Skip to content

Instantly share code, notes, and snippets.

View samuraee's full-sized avatar
💭
Most likely coding...

Aboozar Ghaffari samuraee

💭
Most likely coding...
View GitHub Profile
@samuraee
samuraee / README.md
Created January 31, 2024 17:35 — forked from zhiguangwang/README.md
Shadowsocks Systemd Service

Copy ssserver.service to under /lib/systemd/system/ and run:

sudo systemctl enable ssserver
sudo systemctl start ssserver

sudo systemctl status ssserver

@samuraee
samuraee / singbox.json
Last active June 2, 2023 14:14
My SingBox Conf
{
"log": {
"level": "trace"
},
"dns": {
"servers": [{
"tag": "local",
"address": "217.218.127.127",
"detour": "direct"
}, {
@samuraee
samuraee / Sysctl Tweaks.md
Created January 8, 2022 16:57
Sysctl Tweaks

vim /etc/sysctl.conf

### IMPROVE SYSTEM MEMORY MANAGEMENT ###

# Increase size of file handles and inode cache
fs.file-max = 2097152

# Do less swapping
vm.swappiness = 10
@samuraee
samuraee / ssh-login-notif-slack.md
Last active November 9, 2021 09:14
SSH Login Notifications in Slack

SSH Login Notifications in Slack

It’s handy to know who’s logging into servers around your projects. Slack offers a beautiful way to do this in combination with pam.d.

I am assuming you’re using a CentOS-derived OS for locations, but this should work on any *nix-based OS with pam.d enabled.

  1. Add an incoming webhook in Slack – navigate to: https://YOUR_DOMAIN.slack.com/apps/manage/custom-integrations We recommend naming the spot something that is recognizable; that way it won’t get deleted in the future.
@samuraee
samuraee / install-kerio-rhel8.md
Last active February 25, 2021 07:56
Install kerio vpn client on RHEL 8 8 amd 64

Install kerio vpn client on RHAEL8 (Fedora 33 & Centos 8) amd 64

This tutorial show you how to install kerio vpnClient on rhel8 64bit. Kerio vpnClient does not have any .rpm official version!

  1. First of all download kerio-control-vpnclient-###-linux-amd64.deb from http://www.ryadel.com/en/kerio-control-vpn-client-all-versions-direct-download-links/ which contain many version of kerio-control-vpn-client or everywhere else.

  2. after download kerio-control-vpnclient-###-linux-amd64.deb we must convert it to .rpm

@samuraee
samuraee / alireza.php
Created May 17, 2019 14:23
alireza task
<?php
$string = 'aboozar';
$dic = [
'a' => [1, 2, 'a'],
'b' => [3, 4, 'b'],
'o' => [5, 6],
'z' => [7, 8, 'd', 'f'],
'r' => [9, 0, 'e']
];
@samuraee
samuraee / build_oracle_jdk_debs.sh
Created July 7, 2018 11:18 — forked from notpeter/build_oracle_jdk_debs.sh
Oracle Java JDK - Make Debian/Ubuntu deb packages
#!/usr/bin/env bash
set -u
# Downloads Oracle JDK tarball and makes fancy debs out of it.
# Output is full of warnings, but the packages work. ;)
# Example URL='http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz'
MAJOR=8
MINOR=45
BUILD=14
# Download latest Android image, "hammerhead" for Nexus 5 (GSM/LTE)
https://developers.google.com/android/nexus/images#hammerhead
# Download latest TWRP
https://dl.twrp.me/hammerhead/
# Download latest SuperSu
https://download.chainfire.eu/supersu
Enable USB debugging.
@samuraee
samuraee / dragon.md
Created March 4, 2018 19:53
dragon.md

Configure IPsec/L2TP VPN Clients

Read this in other languages: English, 简体中文.

Note: You may also connect using IPsec/XAuth mode, or set up IKEv2.

After setting up your own VPN server, follow these steps to configure your devices. IPsec/L2TP is natively supported by Android, iOS, OS X, and Windows. There is no additional software to install. Setup should only take a few minutes. In case you are unable to connect, first check to make sure the VPN credentials were entered correctly.

An alternative setup guide with images is available, written by Tony Tran.

@samuraee
samuraee / LT
Last active October 31, 2017 09:15
Nicehash
YOUR BTC MINING AND DEPOSIT ADDRESS:
Wallet: 3K3VYaiXtV2eMDi3rVanYhxsq1xvyYFVpV
Blockchain
Bitcoin: 1EJdALUCjrsDEQehtrE48vgm9aJD5q5Rss
Ethereum: 0xDA15e9682a3140C86e141F1CA1f7d7ED7Ae6A00B
Wallet id: b46e2ed2-5bc3-4759-8c65-208a4d0fca75