ko-0
|
이 사용자는 한국어를 모르거나, 이해하는 데 어려움이 있습니다.
|
nl-0
|
Deze gebruiker heeft geen kennis van het Nederlands (of begrijpt het met grote moeite).
|
|
User UTC + 1 (Paris, France)
Own tools
Hosted tools
Other tools
MySQL
Connect to the wikis replicas
$ mysql --defaults-file=replica.my.cnf -h enwiki.labsdb
MariaDB [(none)]> connect enwiki_p
...
$ mysql --defaults-file=~/replica.my.cnf -h enwiktionary.labsdb enwiktionary_p
MariaDB [(none)]> connect enwiktionary_p
...
$ mysql --defaults-file=replica.my.cnf -h frwiktionary.labsdb
connect frwiktionary_p
Page content
SELECT CAST(pp_page AS CHAR(1000000) CHARACTER SET utf8) FROM page JOIN page_props ON page_id = pp_page WHERE page_namespace = '' and page_title = 'jackpot';
Pages modified by
SELECT page_title FROM pp_value JOIN page ON page_id = pp_page WHERE pp_value = 'JackPotte';
Edit count
select * from user where user_name='JackPotte';
Created pages
SELECT DISTINCT page_title FROM page JOIN revision ON page_id=rev_page WHERE rev_user_text='JackPotte' and page_namespace=0 AND page_is_redirect=0;
Hidden editions
SELECT DISTINCT page_title FROM page JOIN revision ON page_id=rev_page WHERE rev_user_text='JackPotte' and page_namespace=0 AND page_is_redirect=0 and rev_deleted=1;
Count the number of editions on a day
SELECT COUNT(*) FROM revision where rev_timestamp like '20150531%';
Create one's own database
mysql --defaults-file=replica.cnf -h tools-db
...
create database p48358730291690573246813765835736425432__mycooldb;
...
Crons
local-jackbot@tools-login:~$ crontab -l
0 0 * * * jsub -mem 1G -once -quiet -N WT "$HOME/WT.sh"
1 0 * * * jsub -mem 1G -once -quiet -N WP "$HOME/WP.sh"
0 */6 * * * jsub -mem 1G -once -quiet -N WN "$HOME/WN.sh"
0 */24 * * * webservice restart
2 0 * * * jsub -mem 1G -once -quiet -N redirect "$HOME/redirect.sh"
3 0 * * * jsub -mem 1G -once -quiet -N redirect "$HOME/update.sh"
local-jackbot@tools-login:~$ qstat
job-ID prior name user state submit/start at queue slots ja-task-ID
-----------------------------------------------------------------------------------------------------------------
111816 0.26093 WP local-jackbo r 05/25/2013 00:00:08 task@tools-exec-02.pmtpa.wmfla 1
local-jackbot@tools-login:~$ qdel 111816
local-jackbot has registered the job 111816 for deletion
local-jackbot@tools-login:~$ qstat
local-jackbot@tools-login:~$
Old update
tools.jackbot@tools-login:~$ cat updateFTP.sh
cd public_html/JackBot
rm *.zip
wget http://faux-amis.fr/JackBot.zip
unzip -o JackBot.zip
New update
tools.jackbot@tools-login:~$ cat updateGit.sh
cd JackBot
git stash
git pull
Git
apt-get remove git-review
pip install git-review
git review -s
git branch
git remote -v
ssh jackpotte@gerrit.wikimedia.org:29418/test/mediawiki/extensions/examples.git
git review -s
git config -l
git config --global user.name "jackpotte"
git clone https://gerrit.wikimedia.org/r/p/test/mediawiki/extensions/examples.git
git review -sgit pull origin master
git pull origin master
git checkout -b jackbot-1 master
git diff
git status
git add test1.php
git status
git diff --cached
git commit
git pull origin master
git rebase master
git review -R
cd .git
git fetch https://gerrit.wikimedia.org/r/mediawiki/core refs/changes/69/17069/1 && git checkout FETCH_HEAD
Git / Gerrit
cd /e/www/Git/
git clone ssh://jackpotte@gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz
cd Quiz
vim Quiz.class.php
git add Quiz.class.php
git commit
git fetch
git push ssh://jackpotte@gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz HEAD:refs/for/master
# Error with a change ID
git commit --amend
# Insertion of the change ID at the last line
git push ssh://jackpotte@gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz HEAD:refs/for/master