Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
Working from home

Faizar Septiawan icarrr

🏡
Working from home
View GitHub Profile
View README.md

Open edX

Continue installation Open edX

@icarrr
icarrr / README.md
Last active Sep 15, 2020
chatwoot installation script
View README.md

Chatwoot installation script

@icarrr
icarrr / web-servers.md
Created Mar 5, 2020 — forked from willurd/web-servers.md
Big list of http static server one-liners
View web-servers.md

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@icarrr
icarrr / README.md
Created Feb 29, 2020
example conf nginx using ssl
View README.md

Note: If you want to use main_y config, you need a directory of snippets.

$ tree snippets
snippets
├── self-signed.conf
├── ssl
│   ├── portal.crt
│   └── portal.key
@icarrr
icarrr / changepassword.sh.j2
Created Jan 22, 2020 — forked from elleryq/changepassword.sh.j2
Create Django super user in ansible
View changepassword.sh.j2
#!/usr/bin/expect
set timeout -1;
spawn {{django_dir}}/venv/bin/python manage.py changepassword {{admin_user}};
expect {
"Password:" { exp_send "{{admin_pass}}\r" ; exp_continue }
"Password (again):" { exp_send "{{admin_pass}}\r" ; exp_continue }
eof
}
@icarrr
icarrr / get_go.sh
Created Jan 17, 2020 — forked from Zate/get_go.sh
Shell script to download and install latest golang
View get_go.sh
#! /bin/bash
# [get_golang.sh](https://gist.github.com/n8henrie/1043443463a4a511acf98aaa4f8f0f69)
# Download latest Golang release for AMD64
# https://dl.google.com/go/go1.10.linux-amd64.tar.gz
set -euf -o pipefail
# Install pre-reqs
sudo apt-get install python3 git -y
o=$(python3 -c $'import os\nprint(os.get_blocking(0))\nos.set_blocking(0, True)')
View global-gitignore.md

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
@icarrr
icarrr / restart_network.ps1
Created Dec 9, 2019
Restart network iFace ethernet and VBox
View restart_network.ps1
# Restart iFace Ethernet
Restart-NetAdapter -Name "Ethernet"
# Restart iFace VBox
Restart-NetAdapter -Name "VirtualBox Host-Only Network"
@icarrr
icarrr / get_list_iface.ps1
Created Dec 9, 2019
Get list interface using PowerShell
View get_list_iface.ps1
netsh interface show interface
CMD /c PAUSE
@icarrr
icarrr / add_port.sh
Created Dec 9, 2019
Add and remove port RabbitMQ on CentOS 7 or RHEL 7
View add_port.sh
sudo firewall-cmd --zone=public --permanent --add-port=4369/tcp --add-port=25672/tcp --add-port=5671-5672/tcp --add-port=15672/tcp --add-port=61613-61614/tcp --add-port=1883/tcp --add-port=8883/tcp
sudo firewall-cmd --reload
You can’t perform that action at this time.