Skip to content

Instantly share code, notes, and snippets.

@devlifeX
devlifeX / ovpn.sh
Last active December 12, 2020 22:58
Easy Setup And Run OpenVPN Server with docker compose, Using Same profile for multiple connections. Easy Setup! Enjoy :)
# Requiremnts: Docker, Docker Compose a Server with 256 MB Of RAM.
# If you neeed Install docker and docker compose on ubuntu (tested on ubuntu 16) use this gist: https://gist.github.com/devlifeX/be64df7608e08853aad995c65872df59
# 1) Put the content in ovpn.sh
# 2) chmod +x ovpn.sh
# 3) execute like this: ./ovpn.sh xxx.xxx.xxx.xxx (xxx's is your ip or domain address)
BASE=/home/$(whoami)
CONFIG="$BASE/openvpn-data/conf/openvpn.conf"
mkdir -p $BASE
cd $BASE
@devlifeX
devlifeX / .bashrc
Last active December 25, 2020 15:50
Append These code to your .bashrc and make your life easier!
# Docker section ################################################
# - Stop all running docker containers
function stopAll {
containers=$(docker ps -qa)
if [ ! -z "$containers" ]
then
echo $containers | xargs docker container rm -f $1
else
echo "No Containers for remove!" | grep -e "."
@devlifeX
devlifeX / import-listing.php
Last active October 9, 2020 07:20
Listing_Import for import data from listing theme wordpress
class Listing_Import
{
public function __construct()
{
if (
isset($_GET['task']) &&
$_GET['task'] === "import"
) {
add_action('init', [$this, 'doAction']);
@devlifeX
devlifeX / listing-export.php
Last active October 9, 2020 08:29
Listing_Export for export data theme listing
<?php
class Listing_Export
{
public function __construct()
{
if (
isset($_GET['task']) &&
$_GET['task'] === "export"
) {
@devlifeX
devlifeX / env.php
Created October 9, 2020 03:57
PHP ENV file handler, just include it and put .env file in your code, use like this: $_ENV['foot']; in your code.
<?php
class DotENV
{
private $options = [];
public function __construct($options)
{
$this->options = $options;
@devlifeX
devlifeX / export.php
Created October 8, 2020 05:41
Export wordpress taxonomy, Alos import.php is available
<?php
class Export_Taxonomy
{
private $options = [];
public function __construct($options)
{
if (
isset($_GET['task']) &&
$_GET['task'] === "export"
@devlifeX
devlifeX / import.php
Created October 8, 2020 05:40
Import wordpress taxonomy, You can aslo override exported taxonomy
<?php
class Import_Taxonomy
{
private $options = [];
public function __construct($options)
{
if (
isset($_GET['task']) &&
$_GET['task'] === "import"
@devlifeX
devlifeX / docker-installer.sh
Last active September 18, 2021 00:50
Docker Installer - ubuntu 64bit
sudo apt-get update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
echo "official GPG key"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@devlifeX
devlifeX / dante_setup.sh
Created June 16, 2019 05:54 — forked from gpchelkin/dante_setup.sh
How To Setup SOCKS5 Proxy Server for (not only) Telegram using Dante on Ubuntu 16.04 / 18.04
### NOT A SCRIPT, JUST A REFERENCE!
# install dante-server
sudo apt update
sudo apt install dante-server
# or download latest dante-server deb for Ubuntu, works for 16.04 and 18.04:
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/dante/dante-server_1.4.2+dfsg-2build1_amd64.deb
# or older version:
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
@devlifeX
devlifeX / telegram-installer.sh
Created May 15, 2019 20:56 — forked from javiersantos/telegram-installer.sh
Install Telegram for Deskop (Linux)
#!/bin/bash
echo "============================================="
echo "== Telegram Script Installer v 0.1 =="
echo "== =="
echo "== by Jalcaldea =="
echo "============================================="
echo "Downloading necesary files..."