mysql@geo-db-specials-master.query.consul[specials]>SELECT * from events_local_users where user_id = 1624842 limit 20;
+---------+---------+---------------------+-------+---------------------+---------------+------------+---------------------------+----------------------------+-----------------+----------------+
| wiki_id | user_id | user_name | edits | editdate | last_revision | cnt_groups | single_group | all_groups | user_is_blocked | user_is_closed |
+---------+---------+---------------------+-------+---------------------+---------------+------------+---------------------------+----------------------------+-----------------+----------------+
| 604442 | 1624842 | | 0 | 2017-12-14 08:04:57 | 0 | 1 | poweruser | poweruser | 0 | 0 |
| 652499 | 1624842 | 3 | 0 | 2016-03-28 00:47:55 | 752875 | 0 | sysop
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# processed 2000 packets sniffed in 275.36 sec as redis | |
mq::elecena_products::messages lpop 172.17.0.3 | |
86.105.54.80 rpush mq::elecena_products::messages | |
mq::elecena_products::messages lpop 86.105.54.80 | |
86.105.54.80 rpush mq::elecena_datasheets::messages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLUSTER=$1 | |
TABLE_NAME=user | |
echo "Will remove per-wiki '${TABLE_NAME}' tables on '${CLUSTER}' cluster..." | |
WIKICITIES_PARAMS=`dbparams.pl --name wikicities_${CLUSTER} --type=slave` | |
MASTER_PARAMS=`dbparams.pl --name wikicities_${CLUSTER} --type=master` | |
for DBNAME in `mysql $WIKICITIES_PARAMS --batch --disable-column-names -e 'select TABLE_SCHEMA as wiki_db FROM information_schema.TABLES WHERE TABLE_NAME="'${TABLE_NAME}'"'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_sshCompletion () # By convention, the function name | |
{ #+ starts with an underscore. | |
local cur | |
# Pointer to current completion word. | |
# By convention, it's named "cur" but this isn't strictly necessary. | |
COMPREPLY=() # Array variable storing the possible completions. | |
cur=${COMP_WORDS[COMP_CWORD]} | |
COMPREPLY=( $( compgen -W 'dev-macbre cron-s1 job-s1' -- $cur ) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v master | | |
xargs -L1 | | |
awk '{split($0,a,"/"); print a[2]}' | | |
xargs git push origin --delete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo -i | |
cd /var | |
touch swap.img | |
chmod 600 swap.img | |
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 | |
mkswap /var/swap.img | |
swapon /var/swap.img | |
echo "/var/swap.img none swap sw 0 0" >> /etc/fstab |
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Query digest for "events_local_users" table, found 502190 queries | |
backend:events_local_users.pl events_local_users.pl:651 (INSERT) specials:events_local_users 1.00 job, median time: 84.90 ms, count: 24469000 | |
backend:events_local_users.pl events_local_users.pl:646 (DELETE) specials:events_local_users 1.00 job, median time: 77.01 ms, count: 24485000 | |
specials:events_local_users events_local_users.pl:223 (SELECT) backend:events_local_users.pl 0.02 job, median time: 66.78 ms, count: 520100 | |
specials:events_local_users getTopEditors WikiService 0.01 ap, median time: 146.29 ms, count: 158200 | |
specials:events_local_users loadData ListusersData 0.00 ap, median time: 548.60 ms, count: 16400 | |
backend:events_local_users.pl events_local_users.pl:574 (DELETE) specials:events_local_users 0.00 job, median time: 379.60 ms, count: 5800 | |
specials:events_local_users getTopWikisFromDb FavoriteWikisModel 0.00 ap, median time: 36.22 ms, count: 37400 | |
specials:events_local_users GetTopFiveUsers DataProvider 0.00 ap, median time: 150.80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<code_scheme name="MediaWiki"> | |
<option name="LINE_SEPARATOR" value="
" /> | |
<PHPCodeStyleSettings> | |
<option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" /> | |
<option name="BLANK_LINE_BEFORE_RETURN_STATEMENT" value="true" /> | |
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" /> | |
</PHPCodeStyleSettings> | |
<XML> | |
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" /> | |
</XML> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ index_digest mysql://foo:bar@server/stats | |
------------------------------------------------------------ | |
Found 5 issue(s) to report for "stats" database | |
------------------------------------------------------------ | |
MySQL v5.6.24-72.2-log at statsdb-s2 | |
index-digest v0.1.0 | |
------------------------------------------------------------ | |
redundant_indices → table affected: events | |
✗ "user_id_idx" index can be removed as redundant (covered by "for_editcount_idx") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- bots | |
SELECT * FROM products WHERE prod_id IN (7205887,7895047,7895046,7989641,9369286,9369287,9369890,9369891,9369895,9369896,9552054,9552055,9557908,9631579,1011753,1035788,1212991,1010860,1010861,1009436,2788153,4583962,1012990,1012987,1012985,1009476,1009477,1009478,1009479,1009480,1009481,1009482,1009484,1009485,1009486,1009488,1009487,1009489,1009483,1010957,1011751,1012979,1012957,1012958,1012959,1009504,1010856,1016005,1010142,1009439,1012944,1009490,1012946,1010141,1010149,1014468,1012963,1012962,1011752,1013029,1010858,1012789,1012971,1012973,1012974,1012975,1012976,1012977,1012978,1014431,1012980,1012948,1010863,1009437,1009438,1010857,1012984,1009741,1010864,1012981,1012982,1009428,1010262,1012992,1010139,1012986,1010305,1010306,1009440,1009442,1009441,1009443,1009444,1012942,1010215,1033572,1012964,1212993,1212994,1009433,1212996,1212995,1212992,1012949,1016007,1016009,1016008,1010169,1031334,1009502,1012956,1012960,1212997,1014286,1010148,1010143,1009422,1009423,1009424,1009425,1009426,1009427 |