Skip to content

Instantly share code, notes, and snippets.

View eamirgh's full-sized avatar
:octocat:
trying to make the world a better place

Amir Ghaffari eamirgh

:octocat:
trying to make the world a better place
View GitHub Profile
@eamirgh
eamirgh / README.md
Created October 20, 2022 06:33 — forked from mahmoud-eskandari/README.md
Install v2ray on Bridge:(Ubuntu +18 via systemd) - Upstream (Ubuntu +18/CentOS +7 via docker)

At the beginning run this command on your internet server (foreign):

برای شروع میتوانید یک دایرکتوری در سرور خارجی ایجاد کنید و وارد آن شوید.

It's better to make a new directory and cd into:

mkdir vmess
cd vmess

Keybase proof

I hereby claim:

  • I am eamirgh on github.
  • I am eamirgh (https://keybase.io/eamirgh) on keybase.
  • I have a public key ASBhMOgxH20zHy_Gv0KGiqPva_tGzCim6dyqHsgyyXCzgwo

To claim this, I am signing this object:

@eamirgh
eamirgh / gist:650f86393b1826dd5c5e5fc68dd5f06e
Last active June 5, 2024 18:51
RESET Goland Evaluation period LINUX
rm -rf ~/.config/JetBrains/GoLand2021.3/eval
rm -rf ~/.config/JetBrains/GoLand2021.3/options/other.xml
touch ~/.config/JetBrains/GoLand2021.3/options/other.xml
sed -i -E 's/<property name=\"evl.*\".*\/>//' ~/.config/JetBrains/GoLand2021.3/options/other.xml
rm -rf ~/.java/.userPrefs/jetbrains/goland
@eamirgh
eamirgh / Procfile
Created August 14, 2020 08:06 — forked from sdrew/Procfile
Laravel configs for Heroku/Dokku
web: vendor/bin/heroku-php-apache2 public/
@eamirgh
eamirgh / main.go
Created April 15, 2020 11:03 — forked from manishtpatel/main.go
GoLang Encrypt string to base64 and vice versa using AES encryption.
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"fmt"
"io"
)
@eamirgh
eamirgh / Dockerfile
Last active December 23, 2019 14:57
FROM php:7.4.1-fpm-alpine3.10
ENV NGINX_VERSION 1.16.1
ENV NJS_VERSION 0.3.5
ENV PKG_RELEASE 1
RUN set -x \
# create nginx user/group first, to be consistent throughout docker variants
&& addgroup -g 101 -S nginx \
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \
#!/bin/sh
#
# installer.sh
# Copyright (C) 2018 Kovid Goyal <kovid at kovidgoyal.net>
#
# Distributed under terms of the GPLv3 license.
#
python=$(command -v python3)
if [ -z "$python" ]; then
@eamirgh
eamirgh / run.py
Created June 29, 2019 13:11 — forked from amrza/run.py
How to write RTL(Arabic/Persian) text on images in python.
# Tested on Python 3.6.1
# install: pip install --upgrade arabic-reshaper
import arabic_reshaper
# install: pip install python-bidi
from bidi.algorithm import get_display
# install: pip install Pillow
from PIL import ImageFont
@eamirgh
eamirgh / LEPP.md
Created May 1, 2019 16:30 — forked from cham11ng/LEPP.md
LEPP Setup - Ubuntu 16.04 LTS

A Relatively Secure Server Stack Setup in Ubuntu 16.04 LTS

Anup Dhakal

Sagar Chamling

Introduction

In this guide, LEPP stands for Linux, Nginx (pronounced as Engine-X) , Postgres and PHP (PHP Hypertext Preprocessor).

@eamirgh
eamirgh / bulma-sass-scss.rb
Created November 28, 2018 22:44 — forked from DanyHenriquez/bulma-sass-scss.rb
Convert bulma from sass to scss
#!/usr/bin/env ruby
require 'tmpdir'
require 'fileutils'
dir = Dir.tmpdir()
if File.directory?("#{dir}/bulma")
FileUtils.remove_dir("#{dir}/bulma")
end