Skip to content

Instantly share code, notes, and snippets.

Avatar

Hernan Payrumani hrnn

  • Mojix Inc.
  • La Paz, Bolivia
View GitHub Profile
@hrnn
hrnn / install-r-osx.md
Last active Aug 29, 2015
Install R in OSX
View install-r-osx.md

hombrew is required

brew install caskroom/cask/brew-cask
brew cask install xquartz

type your password

brew tap homebrew/science
brew install gcc
brew install r
@hrnn
hrnn / randon.sh
Created Sep 18, 2011
prints a ramdon line from a file
View randon.sh
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Syntax: $0 FILE"
echo $0 - display a random line from FILE.
exit 1
fi
RAND=`od -d -N2 -An /dev/urandom`
LINES=`cat "$1" | wc -l`
LINE=$(( RAND % LINES + 1 ))
You can’t perform that action at this time.