Skip to content

Instantly share code, notes, and snippets.

View Sharaf5's full-sized avatar
🏠
Working from home

Abdelaziz Sharaf Sharaf5

🏠
Working from home
View GitHub Profile
extends Camera
var _duration = 0.0
var _period_in_ms = 0.0
var _amplitude = 0.0
var _timer = 0.0
var _last_shook_timer = 0
var _previous_x = 0.0
var _previous_z = 0.0
@Sharaf5
Sharaf5 / update-git.sh
Created July 8, 2023 23:25 — forked from Calinou/update-git.sh
Updates all Git repositories in a directory
#!/bin/bash
# Copyright (c) 2015 Calinou
# CC0 1.0 Universal
# <https://creativecommons.org/publicdomain/zero/1.0/>
update() {
for d in "$@"; do
test -d "$d" -a \! -L "$d" || continue
cd "$d"
@Sharaf5
Sharaf5 / update-svn.sh
Created July 8, 2023 23:25 — forked from Calinou/update-svn.sh
Updates all Subversion repositories in a directory
#!/bin/bash
# Copyright (c) 2015 Calinou
# CC0 1.0 Universal
# <https://creativecommons.org/publicdomain/zero/1.0/>
update() {
for d in "$@"; do
test -d "$d" -a \! -L "$d" || continue
cd "$d"
@Sharaf5
Sharaf5 / build_linux.sh
Created July 8, 2023 23:24 — forked from Calinou/build_linux.sh
Compile Godot for GNU/Linux 64-bit easily
#!/bin/sh -x
# This script compiles Godot for GNU/Linux in 64-bit.
# Place this script at the root of your Godot Git clone.
# CC0 1.0 Universal
# Build 64-bit Godot for GNU/Linux desktop, in debug and release mode
scons p=x11 -j$(nproc) verbose=no tools=yes target=release_debug openssl=builtin
scons p=x11 -j$(nproc) verbose=no tools=no target=release_debug openssl=builtin
@Sharaf5
Sharaf5 / build_javascript.bat
Created July 8, 2023 23:22 — forked from Calinou/build_javascript.bat
Compile Godot for HTML5 easily (from Windows)
:: This script must be run from a Windows system with the Emscripten SDK
:: installed and configured. 7-Zip and MinGW also need to be installed.
:: Place this script at the root of your Godot Git clone.
:: CC0 1.0 Universal
set threads=%NUMBER_OF_PROCESSORS%
:: Set MinGW path
set PATH=%PROGRAMFILES%\mingw-w64\x86_64-6.2.0-posix-seh-rt_v5-rev0\mingw64\bin\;%PATH%
@Sharaf5
Sharaf5 / godot_android.bat
Created July 8, 2023 23:21 — forked from Calinou/godot_android.bat
Compile Godot for Android (from Windows)
@ECHO OFF
set threads=%NUMBER_OF_PROCESSORS%
call scons platform=android tools=no target=release_debug verbose=no warnings=no progress=no -j%threads%
call scons platform=android tools=no target=release verbose=no warnings=no progress=no -j%threads%
cd platform\android\java\
call gradlew build
@Sharaf5
Sharaf5 / godot_mingw.sh
Created July 8, 2023 23:17 — forked from Calinou/godot_mingw.sh
Compile Godot using MinGW and generate Windows installers using InnoSetup (from Linux)
#!/bin/sh
set -euo pipefail
# Number of CPU threads to use for building
# Use `./godot_mingw.sh <number of threads>` to specify
THREADS=$1
# Godot Git clone path
GODOT_PATH="$HOME/Documents/Git/godotengine/godot"
@Sharaf5
Sharaf5 / 01nginx-tls-sni.md
Created June 22, 2023 16:50 — forked from kekru/01nginx-tls-sni.md
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@Sharaf5
Sharaf5 / freenom.com.ddns.sh
Created June 1, 2023 12:32 — forked from a-c-t-i-n-i-u-m/freenom.com.ddns.sh
Dynamic DNS support shell script for freenom.com
#!/bin/bash
# settings
# Login information of freenom.com
freenom_email="main@address"
freenom_passwd="pswd"
# Open DNS management page in your browser.
# URL vs settings:
# https://my.freenom.com/clientarea.php?managedns={freenom_domain_name}&domainid={freenom_domain_id}
freenom_domain_name="domain.name"
@Sharaf5
Sharaf5 / a2manage.sh
Last active March 24, 2023 07:15 — forked from smuuf/a2manage.sh
a2enmod and a2dismod for Alpine
#!/bin/sh
# Usage:
# ./a2manage.sh e|d mod1 mod2 mod3
# e: enable
# d: disable
MODS_A_CONF_PATH="/etc/apache2/*.conf"
MODS_B_CONF_PATH="/etc/apache2/conf.d/*.conf"