Tag: BASH
-
Code to query Azure Load Balancer Metrics to verify Availability (VipAvailability )
This one was fun to put together. I wanted to write code to query the status of an Azure Load Balancer. I couldn’t find much out there. This code query’s the Azure Load Balancer’s Metrics for VipAvailability – through the REST API. If it returns 100 then are good to go. Anyting else, then there may…
-
Note to self: cURL with data-urlencode for GET/QuerySting values
I know I would loose this if I didn’t blog it. With cURL, you can use “–data-urlencode” with query string params and a GET if you include the “-G” parameter. Of course you still have to escape things out, I just found it easer to add all the QueryString params separately. All the examples I…
-
Extract ADFS signing certificate from the Federation Metadat URL
I did not write this, but I liked it, so I thought I would pass it on! Use this script to extract the ADFS signing certificate from the FederationMetadat url (https://sts.yourserver.com/FederationMetadata/2007-06/FederationMetadata.xml): https://raw.githubusercontent.com/bergie/passport-saml/master/docs/adfs/retrieve_adfs_certificate.sh
-
Grep to Remove Spaces and Comments (#)
Sometimes I just want to look at the content of a config file and not all the descriptions.
-
Raspberry Pi, Raspbian Jessie (based on Debian Jessie) disable AutoLogin GUI & Console
I did NOT want my Raspbian Jessie install to automatically boot into the GUI, and I did Not want it to autologin. I know I can run raspi-config to change it, but I like to script things! I finally tracked down the code for the new raspi-config that supports systemd. It can be found here . Here are…
-
BASH script to change the Security Keys and SALTs in a wp-config.php file
I wanted to automatically change the Security Keys/SALTS when provisioning a new WordPress site. WordPress.com has a service that spits back random values. (https://api.wordpress.org/secret-key/1.1/salt/). The script below CURLs the values and then modifies a wp-config.php file with the new random values. Don’t remember where I got the pieces of this, but here it is, I…
-
Installing WordPress via shell script(BASH)
We have been using a provisioning script that downloads the latest wordpress zip file, extracts into the right location it and sets up the DB connection. I wanted to take it a step further and eliminate the install.php page. The one that looks like this: So i sat down to figure out how to…
-
Activating and deactivating WordPress plugins from a shell script (BASH)
I needed to update my WordPress site provisioning script to download, install and activate a WordPress plugin. The download is the easy part (I just use wget). But how do I activate the plugin. This is what I cam up with: And to be complete, to deactivate:
-
Using cURL, BASH and Google oAuth to access Google Analytics
In this previous post, I used cURL (the command line version) to interact with Google Analytics. I wanted to do the same thing but using oAuth. I took a lot from this page, but there were a few things that I couldn’t get working, and a few things I didn’t know. Follow Steps 1-6 on…
-
Almost to 10,000 visits in a month!
Using my fun Google Analyitics Bash Script July 9151 June 8171 May 7352 April 5027 March 3966 February 3160 January 2741
