This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function to Get Custom Directory path | |
Function Get-CustomDirectory | |
{ | |
[CmdletBinding()] | |
[Alias("CDir")] | |
[OutputType([String])] | |
Param | |
( | |
[Parameter(ValueFromPipeline=$true,Position=0)] | |
$Path = $PWD.Path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
download_directory="$HOME/Pictures/Wallpapers/epic-earth"; | |
apiurl="http://epic.gsfc.nasa.gov/api/images.php"; | |
curl -s "$apiurl" | jshon -a -e image -u | while read image; do | |
destfile="$download_directory/$image.jpg"; | |
mkdir -p "$download_directory"; | |
if [[ -n "$image" && ! -f "$destfile" ]]; then | |
echo "New 🌍 ! $image.jpg"; | |
curl -so "$destfile" "http://epic.gsfc.nasa.gov/epic-archive/jpg/$image.jpg"; | |
ln -sf "$destfile" "$download_directory/latest.jpg"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Add PPAs { | |
# | |
# chrome | |
# | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' |