User:Daveh

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search
  • Real Name: Dave Humphrey
  • Who Am I: Original founder and admin of the UESP since its creation in 1995 (and the Daggerfall text FAQ before that)
  • Where Am I: Currently living and working in the Toronto, Canada area
  • What I Do: Full time employee for the UESP
  • Current Interests: Besides the usual ES stuff I've been lately on a quest to build the world's toughest USB drive (www.viud.net). The VIUD Store is now open!
  • Age: Born in 1973 I am 50 at this edit
  • What I'm Playing: ESO...contact me as @Reorx in the UESP guild
  • Social Media

Site ToDo List[edit]

See my ever growing todo list on Trello. Also see the UESPWiki:Task List page for general tasks which can be done by any editor.

Ideas/Notes[edit]

Just a place for me to jot down some general ideas:

  • Mod Ideas
  • Faction with semi-random quests (ala Daggerfall), many medium-large pre-randomly generated dungeons
  • In-game strategy (ala Civilization). Build 'cities' within the game, gather resources to create buildings, gain prestige to get involved with the province politics (quest line).
  • Luggage (ala Pratchett's Disc World). A large trunk follows you around with a mind, and set of sharp teeth, of its own.


Handy MediaWiki Queries[edit]

  • Count of Daily Edits
     SELECT COUNT( * ) , LEFT( rev_timestamp, 8 ) AS revdate
     FROM `revision` 
     GROUP BY revdate
Add a WHERE rev_minor_edit=0 to not count minor edits.
  • Count of Daily Edits from a Given Date by User
     SELECT COUNT(*) as cnt, rev_user, rev_user_text, LEFT(rev_timestamp, 8) as revdate 
     FROM revision 
     WHERE rev_timestamp > "20121101" 
     GROUP BY rev_user
     ORDER by cnt;

Useful Commands[edit]

  • List Processes Using Port 80
 fuser 80/tcp
  • Memory Usage
 free -m
 top
  • Disk Usage
 df
 du
  • Group Apache Log Errors
  egrep "\[.*\] \[error\] \[client .*\]" error_log | gawk -F ']' '{print $4}' | sort | uniq -c | sort > errors.txt
  • Sorting the Apache Error Log
  awk -vFS=']' '/\[.*\] \[error\] \[client .*\]/ { a[$4]++; } END { for (i in a) print a[i], i; }' < error_log | sort -n > errors.txt
  • Extract Database from Full Dump File
  sed -n '/^-- Current Database: `dbname`/,/^-- Current Database: `/p' alldbs.sql > dbname.sql
  • Extract Pages from Squid Log and Purge
  awk '{print $7}' access.log > allpages.txt
  grep  "/wiki/" allpages.txt > mainpages.txt
  grep "www.uesp.net" mainpages.txt > wwwpages.txt
  egrep "m.uesp.net|mobile.uesp.net" mainpages.txt > mobilepages.txt
  sort wwwpages.txt > wwwpagesort.txt
  uniq wwwpagesort.txt > wwwpagesuniq.txt
  php purgeList.php --purge < wwwpagesuniq.txt
  • Use yum EPEL Repo
   yum install epel-release
  • ElasticSearch
    curl localhost:9201
    curl localhost:9205/_cluster/health?pretty
    curl localhost:9205/_aliases?pretty
    curl 'localhost:9200/_cat/indices?v'
    curl localhost:9205/_stats?pretty
    curl -X DELETE "localhost:9200/my-index-000001?pretty"
    curl -X PUT "localhost:9200/my-data-stream/_alias/my-alias?pretty"
    curl -X DELETE "localhost:9200/my-data-stream/_alias/my-alias?pretty"
    curl -X POST "localhost:9200/_reindex?pretty" -H 'Content-Type: application/json' -d'
     {
       "source": {
         "index": "twitter"
       },
       "dest": {
         "index": "new_twitter"
       }
     }'
  • Updating Firewall with IP Change:
    Login with ssh (admin@10.12.222.11)
    enable 15
    configure terminal
    http #.#.#.# 255.255.255.255 outside

Custom Scripts[edit]

  • Counts all connections per IP address and displays sorted list. Add an optional connection type parameter (TIME_WAIT, ESTABLISHED, LISTEN, etc...) to only list connections in that state.
  • Helper script for banning/unbanning IP addresses using iptables at the server level.


Setting up Eclipse for Remote Development[edit]

Eclipse can be setup for remote development of PHP (and anything else) directly from the UESP servers:

  • Download the base version of Eclipse
  • Install/extract to a desired directory and run
  • Go to Help--Install New Software
  • Select All Sites from the drop down list
  • Find and select the following add-ons:
  • PHP Development Tools (PDT) SDK Feature
  • JavaScript Development Tools
  • Eclipse Web Developer Tools
  • Remote System Explorer End-User Runtime
  • Install the add-ons and restart Eclipse
  • Open a Remote System Explorer perspective (or from within Window--Show View--Other)
  • Define a new connection using a SSH session to content3.uesp.net (you need to have a shell login on content3)

MediaWiki Distribution API[edit]

    The ExtensionDistributor API can get you download URLs, e.g. this:
    
         https://www.mediawiki.org/wiki/Special:ApiSandbox#action=query&format=json&list=extdistbranches&formatversion=2&edbexts=WikiEditor
    
    returns this sort of thing:
    "REL1_39": "https://extdist.wmflabs.org/dist/extensions/WikiEditor-REL1_39-76d9ffd.tar.gz",
    "REL1_40": "https://extdist.wmflabs.org/dist/extensions/WikiEditor-REL1_40-d330183.tar.gz",
    "master": "https://extdist.wmflabs.org/dist/extensions/WikiEditor-master-17163cd.tar.gz",

Links[edit]

Links I always seem to need but never remember...

Internal Site Links

General Things

Wiki Related

Server Architecture:

Runescape Wiki