diff --git a/utils/spam.sh b/utils/spam.sh new file mode 100755 index 0000000..e453d09 --- /dev/null +++ b/utils/spam.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +function req { + ssh c4science-db01 "mysql -B -e \"$@\"" 2> /dev/null +} + +users=$(req "select username,user.id,blurb from phabricator_user.user_profile,phabricator_user.user where user.phid=user_profile.userPHID and isDisabled=false and blurb like '%http%' and blurb not like '%c4science%' and blurb not like '%bitbucket%' order by user_profile.id desc limit 10;" | tail -n +2) +# Same creationtime and updatetime +#users=$(req "select username,user.id,blurb from phabricator_user.user_profile,phabricator_user.user where user.phid=user_profile.userPHID and user_profile.dateCreated=user_profile.dateModified and isDisabled=false and blurb like '%http%' order by user_profile.id desc limit 10;" | tail -n +2) + +while read -r r; do + username=$(echo $r | awk '{FS="\t"}{print $1}') + userid=$(echo $r | awk '{FS="\t"}{print $2}') + google-chrome --incognito https://c4science.ch/people/manage/${userid}/ + + #echo $r +done <<< "$users" +