linux

You are currently browsing articles tagged linux.

If you are an iPhone developer you probably know all about the fun of having to download pretty much every day the previous’ day sales report from iTunesConnect, since after a week it’s gone.

itunesconnectshotStarted to look around for an automated tool and found some great pointer over at just2me.com — since I wanted to grab the raw data I went for the “Auto download reports script”. The versions available for download over there work great on OSx, I tweaked them a bit to have them working on linux flavors using the gnu implementation of the “date” command (i.e. most non-OSx distributions).

If you wish to set them up on a fedora/ubuntu/redhat/etc. box and having run daily in “set and forget” mode (like I did), you can grab the tweaked-up versions from this link. Full credits go to their original creator (rmaddy)

If you wish to graph the logs and get some quick stat out of them you can then use AppViz (which can also download the latest reports for you), or “Sales Report” or similar others.

Tags: , , ,

If you happen to have fun from time to time with *nix shells, and bash in particular, you’ve probably noticed that the command history will soon fill itself up with same-sort-of-commands such the usual ‘ls -la’, ‘uptime’, ‘df -ah’, etc.

Side effect of this is when you want to go back and quickly get to a previously issued commands, you’ll end up pressing up arrow a number of time wading through never ending same commands.

Solution to make your life a bit easier is better_bashrc — just save the zip file somewhere, unzip and replace your current .bashrc (user’s home), log out then back in and you’re good to go.

Or, copy paste what below in your current .bashrc file.

# ———————- copy what below —————

# .bashrc

# User specific aliases and functions

alias rm=’rm -i’
alias cp=’cp -i’
alias mv=’mv -i’

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# This will append any new history to the existing file rather than rewriting it
shopt -s histappend
PROMPT_COMMAND=’history -a’

# This will ignore simple mistakes such as typing otp instead of opt, or ect instead of etc.
shopt -s cdspell

# Remove duplicates in your history
export HISTCONTROL=”ignoredups”
export HISTIGNORE=”&:ls:[bf]g:exit”

# This will ensure that multiple line commands stay together in your history.
shopt -s cmdhist

# ———————- copy what above —————

You can find more tips here.

Tags: , , , , ,