Install Arcanist Phabricator on Fedora 28

$ mkdir $HOME/arctools $ cd $HOME/arctools $ git clone https://github.com/phacility/libphutil.git $ git clone https://github.com/phacility/arcanist.git $ mv $HOME/arctools /opt $ echo ‘export PATH=$PATH:/opt/arctools/arcanist/bin’ >> ~/.bash_profile $ source ~/.bash_profile $ sudo dnf install php php-json $ arc –help $ arc install-certificate # and follow the rest of the instruction from the arc

Setup python app in centos from scratch (centos 6.9+uwsgi+nginx+flask+mysql)

Initial setup $ sudo yum update $ sudo yum install epel-release $ sudo yum groupinstall “Development tools” $ sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel telnet htop $ sudo yum install python-devel python-virtualenv $ sudo yum install mysql-connector-python mysql-devel mysql-server Install Python Download and install Python : https://www.python.org/ ./configure && make && make altinstall Install … Read more

Install google chrome in Fedora for the first time

When you install google chrome in fedora, you probably must have seen this error: $ sudo rpm -i google-chrome-stable_current_x86_64.rpm warning: google-chrome-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY error: Failed dependencies: /usr/bin/lsb_release is needed by google-chrome-stable-68.0.3440.106-1.x86_64 [muffat@localhost Downloads]$ sudo rpm -i google-chrome-stable_current_x86_64.rpm warning: google-chrome-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY error: Failed … Read more

How to move your old repo to github

Before you begin, you might want to add your ssh key into your github account. // push master branch $ cd /repo-directory $ git remote rename origin bitbucket $ git remote add origin https://github.com/username/awesome-new-repo.git $ git push origin master $ git remote rm bitbucket // push another branch $ git checkout develop $ git push … Read more

How to fetching Username-Password credentials in Jenkinsfile

withCredentials([usernamePassword(credentialsId: ‘my-creds’, usernameVariable: ‘USERNAME’, passwordVariable: ‘PASSWORD’)]) { // available as an env variable, but will be masked if you try to print it out any which way // note: single quotes prevent Groovy interpolation; expansion is by Bourne Shell, which is what you want sh ‘echo $PASSWORD > tmp’ // also available as a Groovy … Read more

Nginx config for staging application

resolver 172.17.0.1; resolver_timeout 10s; server { listen 80; server_name staging.app.com; charset utf-8; gzip_vary on; access_log /var/log/nginx/app.access.log; error_log /var/log/nginx/app.error.log; add_header ‘Access-Control-Allow-Origin’ ‘*’ always; add_header ‘Access-Control-Allow-Methods’ ‘GET, POST, OPTIONS, PUT, DELETE’ always; add_header X-Frame-Options “SAMEORIGIN”; set $appweb http://app-web.service.consul; location / { proxy_pass $appweb:5002; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; … Read more