Tag Cloud
Currently Reading
Latest Book Reviews
- Rancher Deep Dive Posted on March 31, 2023
- Leveraging Kustomize for Kubernetes Manifests Posted on March 24, 2023
- Automating Workflows with GitHub Actions Posted on October 13, 2022
- Deep-Dive Terraform on Azure Posted on August 30, 2022
- Effective DevOps Posted on January 5, 2022 All Book Reviews
Latest Posts
- Google Apps API OAuth2 shenanigans Posted on April 7, 2015
- PF syntax check Posted on March 28, 2015
- Restarting single network interface in FreeBSD Posted on February 13, 2015
- Logging your terminal output using script Posted on February 5, 2015
- System Update using Ansible Posted on October 5, 2014
April 7, 2015
Google Apps API OAuth2 shenanigans
by Alpha01
So I literally was just about to start flipping tables because I wasn’t able to get my Google Apps API OAuth2 api verification to work. I was getting the following error:
401. That’s an error.
Error: invalid_client
no support email
As the documentation describes, I created my application and enabled Calendar API access to it, and lastly setup my credentials. The problem was that I was generating my OAuth 2.0 client IDs without completing the app’s consent screen data. As soon as I specified my email address in my app’s consent screen data and regenerated new a client ID, I was able to authenticate my application. If only the Google Developer Console would’ve given a warning of some sort prior to generating a client ID, a lot of #!%6@*# moments would’ve been avoided.
Tags: [google
python
]
March 28, 2015
PF syntax check
by Alpha01
[root@freebsd10 /etc]# pfctl -nf /etc/pf.conf
/etc/pf.conf:4: syntax error
freebsd
pf
networking
]
February 13, 2015
Restarting single network interface in FreeBSD
by Alpha01
service netif restart em0
freebsd
networking
]
February 5, 2015
Logging your terminal output using script
by Alpha01
I remember when I first discovered the tab key autocomplete in Bash and being absolutely jollied because of it. Having just found the existence of the script
utility, it feels almost identical.
script
gives you the capability of logging every thing within your current shell session. In the past, I would always resort to manually copying the text output of my terminal window to a file. In some cases, I would have a really long command line session that I wanted its output saved, which resulted in the entire terminal window crashing when being manually copied due to the extremely large output buffer! Thankfully with script
those problems are a thing of the past.
Example
Its usage is dead simple:
tony@alpha05:~$ script logmyshit.log
Script started, file is logmyshit.log
tony@alpha05:~$ echo "script is fucking awesome!"
script is fucking awesome!
tony@alpha05:~$ exit
Contents of logmyshit.log:
Script started on Wed 04 Feb 2015 10:15:32 PM PST
tony@alpha05:~$ echo "script is fucking awesome!"
script is fucking awesome!
tony@alpha05:~$ exit
Script done on Wed 04 Feb 2015 10:16:00 PM PST
bash
]
October 5, 2014
System Update using Ansible
by Alpha01
CentOS
ansible centosbox -m yum -a 'name=* state=latest'
Ubuntu
ansible debianbox -m apt -a 'update_cache=yes name=* state=latest'
ansible
centos
ubuntu
]