gitignore is not working
git rm -r –cached . git add . git commit -m “fixed untracked files”
git rm -r –cached . git add . git commit -m “fixed untracked files”
pydoc is a python library to make your console output paginates for easier reading. to use it follow the simple example below: import pydoc text = “…paginate me…” pager = pydoc.ttypager(text) print pager you will see the output is gonna be truncated at the beginning when you start to see like when you open up … Read more
Put this code inside Vagrantfile before the last end config.vm.provision “ansible” do |ansible| ansible.playbook = “playbook.yml” ansible.limit = “all” ansible.verbose = “vv” ansible.raw_arguments = [ “–diff” ] end
provider “aws” { access_key = “” secret_key = “” region = “ap-southeast-1” } resource “aws_instance” “web-1” { vpc_security_group_ids = [“sg-xxxxxxxx”] subnet_id = “subnet-xxxxxxxx” ami = “ami-xxxxxxxx” availability_zone = “ap-southeast-1a” instance_type = “t2.micro” tags { Name = “test-terraform-1” } }
Just a case if you want to know some application or service who is running under specific port : $ netstat -tulpn | grep :80 Sometimes you need to run with sudo to see all services : $ sudo netstat -tulpn | grep :80 Output : tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1393/nginx.conf It turns … Read more
$ packer build main.json $ vim ~/.aws/credentials [default] aws_access_key_id = aws_secret_access_key = Add the environment variables at the end of file ~/.bashrc $ vim ~/.bashrc export AWS_ACCESS_KEY_ID= export AWS_SECRET_ACCESS_KEY=
docker build image $ sudo docker build -t image-name . docker to start a container from image $ sudo docker run -itd –name jenkins –publish 8080:8080 –publish 50000:50000 jenkins docker to get inside the container $ sudo docker exec -it jenkins bash docker stop container $ sudo docker stop image-id/name docker remove container $ sudo … Read more
Have you ever experiencing this problem like this? after your install wordpress, setup anything, webserver, database, everything is completed. Yet, wordpress still cannot establishing your database connection. Eventhough you’ve already make sure that your database is up and running (I’m using MySQL) and your port is already open, though. Trust me! I’ve done anything properly, … Read more
So this error showed up right after I updated SSL certificate using certbot. Just take a look at the nginx config and put these lines to make it work again. server { listen 80; listen 443 default ssl; # ssl on – remember to comment this out }
Play video headlessly and only audio with command line : $ mplayer -vo null myvideo.mp4