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
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> |
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
$ 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 |
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
_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
#!/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}'"'` |
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 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 4 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
# processed 500 packets sniffed in 4346.42 sec as None | |
s0 bots-server 1.0000 | |
bjornoya bots-server 0.9847 | |
sphinx bots-server 0.5663 | |
# processed 2000 packets sniffed in 275.36 sec as redis | |
mq::elecena_products::messages lpop consumer:bjornoya 1.0000 | |
mq::elecena_products::messages lpop consumer:svalbard 0.5018 | |
bots-server rpush mq::elecena_datasheets::messages 0.1816 | |
bots-server rpush mq::elecena_products::messages 0.0073 |
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 | |
docker rmi -f $(docker images -f "dangling=true" --format "{{.ID}}") |