Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥
Work from everywhere

Faizar Septiawan icarrr

🔥
Work from everywhere
View GitHub Profile
View README.md

Install Docker Engine and Compose

View Makefile-theming
theming:
echo 'MOOC 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
@icarrr
icarrr / mongo-3_2_16.sh
Created Nov 1, 2020
Install MongoDB 3.2
View mongo-3_2_16.sh
#!/bin/bash
# Tested : Ubuntu 16.04
set -e
# Setup
mkdir mongo-pkg
cd mongo-pkg
wget https://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.2/multiverse/binary-amd64/mongodb-{org-mongos,org-server,org-shell,org-tools,org}_3.2.16_amd64.deb
sudo dpkg -i *