Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
Working from home

Faizar Septiawan icarrr

🏡
Working from home
View GitHub Profile
View install-docker-on-linux-mint-18.sh
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/andrewelkins/1adc587feb610f586f8f40b50b7efc3a/install-docker-on-linux-mint-18.sh | bash -x
##########################################
# Kernel version http://stackoverflow.com/a/4024263
versionlte() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
versionlt() {
View set registry bower old version
jq '. + { "registry": "https://registry.bower.io" }' .bowerrc > out && mv out .bowerrc
@icarrr
icarrr / mailers.json
Created Oct 9, 2019
Phabricator mail config
View mailers.json
[
{
"key": "stmp-mailer",
"type": "smtp",
"options": {
"host": "smtp.sendgrid.net",
"port": 587,
"user": "apikey",
"password": "Your_API_Key",
"protocol": "tls"
@icarrr
icarrr / phabricator.conf
Created Oct 10, 2019
phabricator conf on apache2
View phabricator.conf
<VirtualHost *:port>
DocumentRoot /var/www/html/repository/phabricator/webroot
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
ErrorLog ${APACHE_LOG_DIR}/phabricator-error.log
CustomLog ${APACHE_LOG_DIR}/phabricator-access.log combined
@icarrr
icarrr / docker-ce.sh
Created Oct 17, 2019
Install Docker CE and Docker Compose on CentOS 7 or RHEL 7
View docker-ce.sh
sudo yum install -y epel-release
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce
sudo usermod -aG docker $(whoami)
sudo systemctl enable docker.service
sudo systemctl start docker.service
sudo docker version
@icarrr
icarrr / FaM.md
Created Oct 25, 2019
Find and Move
View FaM.md
$ find /home -iname '*.zip' -exec mv '{}' /backup/ \;
@icarrr
icarrr / rewrite.md
Created Oct 31, 2019
Configuration redirect root site using nginx
View rewrite.md

Redirect root site to other site

location = / {
    return 301 http://www.example.com/wiki/Main_Page;
}

Redirect root site to subdirectory in nginx

location = / {
@icarrr
icarrr / bamboo.service
Created Nov 1, 2019
Bamboo service as systemd
View bamboo.service
[Unit]
Description=Atlassian Bamboo
After=syslog.target network.target
[Service]
Type=forking
User=bamboo
ExecStart=/usr/local/bamboo/atlassian-bamboo/bin/start-bamboo.sh
ExecStop=/usr/local/bamboo/atlassian-bamboo/bin/stop-bamboo.sh
SuccessExitStatus=143
@icarrr
icarrr / bamboo.conf
Created Nov 1, 2019
Bamboo nginx reverse proxy
View bamboo.conf
server {
server_name domain.id;
# NGINX usually only allows 1M per request. Increase this to JIRA's maximum attachment size (10M by default)
client_max_body_size 10M;
access_log /var/log/nginx/bamboo_access.log;
error_log /var/log/nginx/bamboo_error.log warn;
location / {
@icarrr
icarrr / SearchReplace.yml
Created Nov 1, 2019
Search and Replace string using ansible
View SearchReplace.yml
---
- hosts: localhost
tasks:
- name: Search and Replace string
shell: for i in /home/sibunglon/*yml; do sed -i 's/search/replace/g' "$i"; done