Skip to content

Instantly share code, notes, and snippets.

@aveuiller
Last active September 26, 2018 14:31
Show Gist options
  • Save aveuiller/61c8951e420f17ba9188785ad1762263 to your computer and use it in GitHub Desktop.
Save aveuiller/61c8951e420f17ba9188785ad1762263 to your computer and use it in GitHub Desktop.
Tandoori helper scripts
#!/bin/bash
cat apps-todo.csv | wc -l^C
./finished_projects.sh > ../apps-selection/paprika-finished
cd -
cat paprika_finished | xargs -iX grep -e "^X," all.csv > apps-todo.csv
# Todo: create tandoori_finished
# prepend ^ and append , to each line:
# `c-v G I ^ Esc Esc` to prepend ^
# (:%norm A,) to append ,
# grep -f tandoori_finished -v apps-todo.csv > apps-todo.filtered.csv
# cp apps-todo.filtered.csv ../smell_analysis/apps-todo.csv
#!/bin/bash
grep -l ': 100.0' -rin logs/ | cut --d='-' -f2- | cut -d'.' -f1
sudo-g5k apt-get install ruby
sudo-g5k gem install parallel
sudo-g5k mount granche-srv1:/exports/shabchi/allDatabases ~/code_analysis/allDatabases
#!/bin/bash
grep -L ': 100.0' -rin logs/ | cut -d'-' -f2- | cut -d'.' -f1
#!/bin/bash
appsFile="apps-todo.csv"
cloneDir="repositories"
echo "Using input file $1"
cat $appsFile | while IFS=, read name path; do
if [[ -z $name && -z $path ]];then
echo "Skipping empty line"
else
git clone git@github.com:$path $cloneDir/$name
fi
done
sudo-g5k apt-get install postgresql
# Use postgres on /tmp to avoid space limit
sudo-g5k mv /var/lib/postgresql /tmp/postgresql
sudo-g5k mkdir /var/lib/postgresql
sudo-g5k mount --bind /tmp/postgresql /var/lib/postgresql
sudo-g5k systemctl restart postgresql
sudo-g5k su -c "psql < ~/smell_analysis/install/create_db.sql" - postgres
# Mount our paprika databases
sudo-g5k mount $host:/exports/shabchi ~/smell_analysis/paprika_dbs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment