Category: ShellScript
-
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…
-
PowerShell script to backup all SharePoint 2010 lists in all webs in all sites
More backups the better. I wanted a file level backup of every list. Below I used PowerShell to iterate through all the lists on the server and dump them into a folder
-
My git notes
Been playing around with git to manage my “Environment”. This is a note to self. May add more at some point List files that have been “staged” git diff –name-only –cached To create a “Centro repo” To setup an empty central repo: mkdir /your/path/folder/project.git cd /your/path/folder/project.git git init –bare –shared To add files to the…
-
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
-
BASH, cURL script to retrieve Google Analytics data
Last week I wrote this PowerShell code to retrieve Google Analytics data. Below is similar code in BASH using the cURL command.
-
Update DynDNS from the command line
My router is not updating DynDNS correctly, so I wanted to use a simple cron job to do the same. Here is a simple BASH/Shell script to update DynDNS: IP=$(curl -s icanhazip.com) curl -v -k -u username:password “https://members.dyndns.org/nic/update?hostname=DNSHOSTNAME.dyndns.org&myip=$IP”
-
Using cURL to pull Google Reader starred items – Part 2 UnStaring in Google Reader
In the first part of this tutorial, I pulled a couple of variables from the XML feed of my Google Reader’s “starred items”. Now I wanted to “process” the item and UnStar it. This was not easy for me to put together – it was my first attempt at working with the Google API. First…
-
Using cURL to pull Google Reader starred items – Part 1 xpath
A while ago, I wrote a post about using ruby to parse the xml feed of shared starred items in Google Reader. One thing that I did not like about this solution was that I could not get the URL AND mark the item as un-starred. Since I had been playing with REST in these two…
-
Quick bash script to change .htpasswd passwords across a server
I wanted to change passwords for a users that is in all of our htpasswds. Here is a quick bash find script to do that: for PATH in $(find / -name .htpasswd); do htpasswd -b $PATH username NewPassword; done
-
OS X: Running a script when a USB drive is inserted
I rsync all my data to a USB drive that I keep at work. I wanted a way to have my rsync script automatically run when I plugged in the drive – kinda like Time Machine. It ended up being pretty simple. All I needed to do is create and AppleScript and attach it to…
