Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥
Work from everywhere

Faizar Septiawan icarrr

🔥
Work from everywhere
View GitHub Profile
@icarrr
icarrr / README.md
Created Sep 20, 2022
Cloudflared - argo tunnel
View README.md

Login to cloudflare

.\cloudflared tunnel login

Create tunnel

.\cloudflared tunnel create tunnel_name

Argo tunnel config

@icarrr
icarrr / edx_microsite.conf
Created Jul 24, 2022
# NginX conf for micorsite Open edX
View edx_microsite.conf
server {
access_log /edx/var/log/nginx/your-domain.access.log p_combined;
error_log /edx/var/log/nginx/your-domain.error.log error;
server_name your-domain;
location @proxy_to_lms_app {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
View README.md

Install Docker Engine and Compose

View Makefile-theming
say:
echo 'Hello DevX!'
editable:
sudo chown `whoami` -R `pwd`
reset:
sudo chown edxapp -R `pwd`
reset.cache:
View README.md

Open edX compile new theme or re-build assets with default theme

@icarrr
icarrr / s3.md
Created Oct 19, 2021
S3 Bucket Policy & Cors for Public Access
View s3.md

Policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowPublicRead",
            "Effect": "Allow",
 "Principal": {
View README.md

Backup and Restore DB Open edX

@icarrr
icarrr / readme.md
Created Jun 4, 2021
#Python Encode & Decode URL
View readme.md

Python

Encode & Decode URL

Python2

$ alias urldecode='python -c "import sys, urllib as ul; \
    print ul.unquote_plus(sys.argv[1])"'
@icarrr
icarrr / port-forwarding.sh
Created Mar 26, 2021
Forward port from private network to public port
View port-forwarding.sh
#!/bin/bash
# sudo iptables -t nat -I POSTROUTING -m comment --comment "NAT the src ip" -d 192.168.42.12 -o ppp0 -j MASQUERADE
sudo iptables -t nat -I POSTROUTING -m comment --comment "NAT the src ip" -d 192.168.42.12 -j MASQUERADE
sudo iptables -I FORWARD -d 192.168.42.12 -m comment --comment "Accept to forward winbox mikrotik traffic" -m tcp -p tcp --dport 800 -j ACCEPT
sudo iptables -I FORWARD -m comment --comment "Accept to forward winbox mikrotik return traffic" -s 192.168.42.12 -m tcp -p tcp --sport 800 -j ACCEPT
sudo iptables -t nat -I PREROUTING -m tcp -p tcp --dport 1001 -m comment --comment "redirect pkts to virtual machine" -j DNAT --to-destination 192.168.42.12:800