Difference between revisions of "User:Olenz"

From ICPWiki
Jump to: navigation, search
(Other things)
(Quick links)
 
(41 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Problems with the skin ==
+
== Quick links ==
* Images flow into footer
+
* [[ICP design]]
* Page looks strange on IE 6
+
* [[Sandbox]]
** Page width problem
+
* [[Special:ExternalBibSearch]]
** Left and right border of the footer
+
* [[Mediawiki:Sidebar]]
** Logo has black background
+
* http://www.icp.uni-stuttgart.de/~icp/Talk:Main_Page?action=edit&section=new&preload=Template:Person/Preload
** Font size in header nav tabs is too large
+
* [http://www.icp.uni-stuttgart.de/~icp/mediawiki/index.php?title=Special%3AAllPages&from=&to=&namespace=103 ICPAdmin pages]
 +
* [[SysAdmin:Main]]
 +
* [[ICPAdmin:People]]
  
== Other things ==
+
== Administration stuff ==
* Integrate SPGM into website
+
 
* BibTeX
+
=== Granting SVN access to external users ===
 +
 
 +
Description: http://svnbook.red-bean.com/en/1.1/ch06s03.html
 +
 
 +
# Get the public ssh key of the user.
 +
# Append the public ssh key to <tt>/home/svn/.ssh/authorized_keys</tt>.
 +
# Insert <pre>command="svnserve -r /home/svn/repos -t --tunnel-user=<user>",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty</pre> before the key. Now the user can only execute the SVN command, and any other command will be ignored.
 +
# Commit the updated file to git: <code>git commit -a</code>
 +
 
 +
=== MySQL ===
 +
 
 +
* MySQL is running on elk
 +
* For applications, allow access only from localhost
 +
* Log in via <code>mysql -u root -p</code>
 +
* MySQL commands:
 +
# Create a user
 +
CREATE USER <user> IDENTIFIED BY '<password>';
 +
 +
# Create a db
 +
CREATE DATABASE <dbname>;
 +
 +
# Show grants
 +
SHOW GRANTS FOR <user>@<host>;
 +
 +
# Grant full access on DB to user
 +
GRANT ALL ON <dbname>.* TO <user>@<host>;
 +
# Example: Grant full access to user testwiki from localhost
 +
GRANT ALL ON testwiki.* TO testwiki@localhost;
 +
 +
# Revoke access
 +
REVOKE ALL ON testwiki.* FROM testwiki;
 +
 +
# Change Password
 +
SET PASSWORD FOR 'bob'@'%.loc.gov' = PASSWORD('newpass');
 +
 
 +
=== Group Shared Directory ===
 +
 
 +
Make a directory group writable and all new files also (from [http://www.udel.edu/topics/os/unix/general/groupsharing.html])
 +
setfacl -m d:u::rwx,d:g::rwx,d:m:rwx,d:o:r-x <dir>
 +
 
 +
=== Firefox Preferences and Presets===
 +
 
 +
* Firefox generates a new profile from files in <code>/usr/lib/firefox/defaults/profile</code> [http://mike.kaply.com/2012/03/30/customizing-firefox-default-profiles/]
 +
** e.g. <code>bookmarks.html</code>
 +
* Default preferences for firefox are stored in <code>/usr/lib/firefox/defaults/preferences/*.js</code>: [https://developer.mozilla.org/en-US/docs/Code_snippets/Preferences][https://developer.mozilla.org/en-US/docs/Mozilla/Preferences]
 +
* Default preferences for all Mozilla apps are stored in <code>/usr/lib/firefox/defaults/pref/*.js</code>. However, as it is in the firefox lib dir, I assume that actually only firefox will read it.
 +
* To limit the size of <code>places.sqlite</code> and <code>urlclassifier.sqlite</code>, set the preference <code>urlclassifier.updatecachemax</code> [http://kb.mozillazine.org/Urlclassifier.updatecachemax]
 +
* Change default homepage: <code>user_pref("browser.startup.homepage", "http://www.icp.uni-stuttgart.de")</code> [http://mike.kaply.com/2012/03/30/customizing-firefox-default-profiles/]
 +
* Deactivate a plugin: [http://www.cs.indiana.edu/csg/FAQ/Linux/plugin.html]
 +
 
 +
== Useful things ==
 +
 
 +
=== Useful things for LaTeX ===
 +
 
 +
==== Inside ====
 +
* PDFLaTeX
 +
** can use PDF, JPG, PNG
 +
** use filename without extension!
 +
** use <code>epstopdf</code> to convert EPS
 +
* graphicsdir
 +
* empty lines are significant
 +
* Difference between <code>\\</code> and an empty line
 +
* LaTeX 2.09 vs. LaTeX 2ε
 +
** <code>\documentstyle</code> → <code>\documentclass</code>
 +
** <code>\it</code>, <code>\em</code>, ... → <code>\textit</code>, <code>\emph</code> (Differences at the end!)
 +
** If anything, use <code>\itshape</code>
 +
** In general: prefer commands over declarations
 +
* Koma-script classes
 +
* Packages xspace, todonotes, inputenc, fontenc, lmodern, german/babel
 +
 
 +
==== Outside ====
 +
* <code>texdoc</code>
 +
* <code>kpsewhich</code>
 +
* <code>latexmk</code>
 +
* http://detexify.kirelabs.org/classify.html

Latest revision as of 13:30, 10 February 2014

Quick links

Administration stuff

Granting SVN access to external users

Description: http://svnbook.red-bean.com/en/1.1/ch06s03.html

  1. Get the public ssh key of the user.
  2. Append the public ssh key to /home/svn/.ssh/authorized_keys.
  3. Insert
    command="svnserve -r /home/svn/repos -t --tunnel-user=<user>",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty
    before the key. Now the user can only execute the SVN command, and any other command will be ignored.
  4. Commit the updated file to git: git commit -a

MySQL

  • MySQL is running on elk
  • For applications, allow access only from localhost
  • Log in via mysql -u root -p
  • MySQL commands:
# Create a user
CREATE USER <user> IDENTIFIED BY '<password>';

# Create a db
CREATE DATABASE <dbname>;

# Show grants
SHOW GRANTS FOR <user>@<host>;

# Grant full access on DB to user 
GRANT ALL ON <dbname>.* TO <user>@<host>;
# Example: Grant full access to user testwiki from localhost
GRANT ALL ON testwiki.* TO testwiki@localhost;

# Revoke access
REVOKE ALL ON testwiki.* FROM testwiki;

# Change Password
SET PASSWORD FOR 'bob'@'%.loc.gov' = PASSWORD('newpass');

Group Shared Directory

Make a directory group writable and all new files also (from [1])

setfacl -m d:u::rwx,d:g::rwx,d:m:rwx,d:o:r-x <dir>

Firefox Preferences and Presets

  • Firefox generates a new profile from files in /usr/lib/firefox/defaults/profile [2]
    • e.g. bookmarks.html
  • Default preferences for firefox are stored in /usr/lib/firefox/defaults/preferences/*.js: [3][4]
  • Default preferences for all Mozilla apps are stored in /usr/lib/firefox/defaults/pref/*.js. However, as it is in the firefox lib dir, I assume that actually only firefox will read it.
  • To limit the size of places.sqlite and urlclassifier.sqlite, set the preference urlclassifier.updatecachemax [5]
  • Change default homepage: user_pref("browser.startup.homepage", "http://www.icp.uni-stuttgart.de") [6]
  • Deactivate a plugin: [7]

Useful things

Useful things for LaTeX

Inside

  • PDFLaTeX
    • can use PDF, JPG, PNG
    • use filename without extension!
    • use epstopdf to convert EPS
  • graphicsdir
  • empty lines are significant
  • Difference between \\ and an empty line
  • LaTeX 2.09 vs. LaTeX 2ε
    • \documentstyle\documentclass
    • \it, \em, ... → \textit, \emph (Differences at the end!)
    • If anything, use \itshape
    • In general: prefer commands over declarations
  • Koma-script classes
  • Packages xspace, todonotes, inputenc, fontenc, lmodern, german/babel

Outside