here you goThings I’ve made, read and saved — shared here.

GNU/Linux, MacOS

On this page
  1. Notes
  2. Pick up *NIX skills
  3. Installing OpenJDK on Mac OSX
  4. Burning ISO images to CD/DVD from shell
  5. don't want namservers handed out by local DHCP server?
  6. Tell apt to add new pgp key to its list
  7. Label Drives using e2label command
  8. Compiling stuff in 32 bit mode on Mac OSX 10.6
  9. Produce print ready copies of man docs
  10. Change keyboard layout in the shell
  11. find memory usage by a process(?)
  12. Enabling anti-aliased fonts on Ubuntu
  13. Resources
  14. OpenBSD
  15. Minix
  16. Debian
  17. Measuring stuff
  18. Running log of things

See also:

Keep in mind to explore:

Notes

  • To convert the .pub file into pem format -- ssh-keygen -f rsa.pub -e -m pem
  • pidof <appname> returns the pid of the application. useful for killing the app etc..
  • The sock file for mysql5 installed using macports lives at /opt/local/var/run/mysql5/mysqld.sock . You will need this when using thirdy party SQL clients such as Seqel Pro
  • Use python_select to select the default python that is used on your mac.
  • If a download is corrupted while installing from macports, try sudo port clean --all <the offending package>
  • Upgrade ports and all other software: sudo port selfupdate and sudo port upgrade outdated.
  • X environment tricks for Mac OS X.

Pick up *NIX skills

Installing OpenJDK on Mac OSX

  • Download Soylatte

  • Unzip to ~

  • Edit ~/.bashrc and add these lines:

     JAVA_HOME=~/java
     export JAVA_HOME
     export PATH=~/java/bin:$PATH
     
  • activate changes with $source ~/.bashrc

Burning ISO images to CD/DVD from shell

DVD:

$ growisofs -dvd-compat -Z /dev/hdc=dvd.iso

CD: Find out the cd recording device using cdrecord -scanbus

$ $ cdrecord -scanbus
scsibus2:
        2,0,0   200) 'HL-DT-ST' 'DVDRAM GH22NS50 ' 'TN01' Removable CD-ROM

Use cdrecord to burn.

$ cdrecord -v -dao dev=2,0,0 speed=8 file.iso

don't want namservers handed out by local DHCP server?

Comment out domain-name-servers, in /etc/dhcp/dhclient.conf.

Tell apt to add new pgp key to its list

$ curl -s http://someurl/key.pgp | sudo apt-key add -
$ sudo apt-key list

Label Drives using e2label command

$ sudo e2label /dev/sdg1 emdebian

Compiling stuff in 32 bit mode on Mac OSX 10.6

Add these flags to ./configure.

CFLAGS="-O -arch i386" CXXFLAGS="-O -arch i386" LDFLAGS="-arch i386"

Produce print ready copies of man docs

$ man -t `man -w tmux` | ps2pdf - tmux.pdf

Change keyboard layout in the shell

$ setxkbmap us

2014/11/25: swapped caps and left-ctrl. Put line below in /etc/default/keyboard

XKBOPTIONS="lv3:ralt_alt,compose:menu,ctrl:nocaps"

and run sudo dpkg-reconfigure keyboard-configuration and confirm changes to keep the changes you have made.

find memory usage by a process(?)

$ ps -Ao pid,rsz,args | grep <name>

src

Enabling anti-aliased fonts on Ubuntu

Edit $IDEA/bin/idea.vmoptions file and add these options:

-Dswing.aatext=true
-Dawt.useSystemAAFontSettings=lcd

The above options managed to get smooth font rendering on Ubuntu 12.10 using OpenJDK7.

Resources

OpenBSD

Minix

Debian

Measuring stuff

  • osquery -- allows you to easily ask questions about your Linux and OSX infrastructure. Whether your goal is intrusion detection, infrastructure reliability, or compliance.

Running log of things