Skip to content

Instantly share code, notes, and snippets.

View samsulmaarif's full-sized avatar

Samsul Ma'arif samsulmaarif

View GitHub Profile
@samsulmaarif
samsulmaarif / install-gitlab-runner.sh
Last active March 5, 2024 10:16
Script to install GitLab Runner on openSUSE Leap 15.2
#!/usr/bin/env bash
set -x
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit
fi
zypper ref
@samsulmaarif
samsulmaarif / serving-apple-app-site-association.conf
Last active November 9, 2023 04:23
Serving /apple-app-site-association for iOS App in nginx
server {
listen 80;
server_name myweb.id www.myweb.id;
root /var/www/myweb.id/project/public/;
error_log /var/log/nginx/myweb.id-error.log;
index index.php index.html;
location /apple-app-site-association {
alias /var/www/otherfolder/ios/;

Moodle

MOODLE (singkatan dari Modular Object-Oriented Dynamic Learning Environment) adalah paket perangkat lunak yang diproduksi untuk kegiatan belajar berbasis internet dan situs web yang menggunakan prinsip social constructionist pedagogy.

Hardware Requirement

  • Disk space: 200MB for the Moodle code, plus as much as you need to store content. 5GB is probably a realistic minimum.
  • Processor: 1GHz (min), 2GHz dual core or more recommended.
  • Memory: 512MB (min), 1GB or more is recommended. 8GB plus is likely on a large production server
  • Consider separate servers for the web "front ends" and the database. It is much easier to "tune"
[root@VDCPLXAPMAP01 nginx]# cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.8 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.8"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
<VirtualHost *:80>
DocumentRoot "/var/www/wordpress"
ServerName kampus.ac.id
ServerAlias www.kampus.ac.id
DirectoryIndex index.php index.html
Redirect / https://kampus.ac.id
<Directory "/var/www/wordpress">
Options Indexes FollowSymLinks
AllowOverride All

Install Docker

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt install -y apt-transport-https
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
[unix_http_server]
file=/run/supervisord.sock ; the path to the socket file
;chmod=0700 ; socket file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; default is no username (open server)
;password=123 ; default is no password (open server)
;[inet_http_server] ; inet (TCP) server disabled by default
;port=127.0.0.1:9001 ; ip_address:port specifier, *:port for all iface
FROM node:12-alpine as build
# create app Directory
RUN mkdir /app
WORKDIR /app
ENV NUXT_TELEMETRY_DISABLED 1
ENV NODE_OPTIONS "--max_old_space_size=4096"
COPY . /app
resource "google_compute_firewall" "vpc_firewall" {
name = "test-firewall"
network = google_compute_network.vpc_network.name
allow {
protocol = "icmp"
}
allow {
protocol = "tcp"