update-alternatives --verbose --query java
sudo update-alternatives --install /usr/bin/java java
/opt/jdk1.7.0_03/bin/java 1701
sudo update-alternatives --install /usr/bin/javac javac
/opt/jdk1.7.0_03/bin/java
c
1701
/usr/lib/mozilla/plugins/libnpjp2.so
->
/opt/jdk1.7.0_13/jre/lib/i386/libnpjp2.so
. Also it may be useful to
uninstall the icedtea java plugin.
sort --stable -k1,1 file_name.txt
sort -n --stable -k1,1 file_name.txt
sudo vi
/etc/bash_completion
and in line 1587 replace -o
defaults
with -o filenames
ls -l /proc/PID/fd
lsof -p PID
lsof -p `pgrep firefox`
find . -type f -name "*.txt" -exec grep "text to find" /dev/null
{} \;
find . -name "*.pdf" -size -2M -print0 | xargs -0 pdfgrep
'pattern'
find . -type f -name "*.m" -exec grep -Hn
--color='auto' "text to find" /dev/null {} \;
ls -l | awk '{if ($5 != 0) print $9}'
sudo blkid -o full -s UUID
/etc/fstab
line to mount fat32 partitions as a particular
user; sudo mount -a
remounts all partitions; see above for
a command that displays UUIDsUUID=1EC7-98B6 /media/BACKUPFAT32 vfat
users,rw,auto,umask=007,uid=1001,gid=1001 0 0
pdfcrop --margins 40 document.pdf
mupdf -I crl-icml20.pdf
pdfjam --nup 2x3 --no-landscape --trim '-1cm -1cm -1cm -1cm'
--frame true presentation.pdf
pdfjam --nup 2x2 --landscape --trim '-1cm -1cm -1cm -1cm' --frame
true presentation.pdf
grep -Hn 'pattern' file*.txt
grep --color='auto' -P -n "[^[:ascii:]]" file.txt
readelf -Wa /usr/lib64/libstdc++.so.6 | grep GLIBCXX_
strings /usr/lib64/libstdc++.so.6 | grep LIBCXX
wget --recursive --no-clobber --page-requisites --html-extension
--convert-links --restrict-file-names=windows --no-host-directories
--domains pomdp.org --no-parent pomdp.org
wget --mirror pomdp.org
ps -eo pid,cmd,etime
bib
entries which are mentioned in a
given .aux
filesudo apt-get install bibtool
bibtool -x document.aux -o new.bib
paste -d '\n' file1 file2 file3
lscpu
synclient TouchpadOff=1
find /path -name '*.pdf' -exec sh -c 'pdftotext "{}" - | grep
--with-filename --label="{}" --color "your pattern"' \;
convert -density 200x200 -quality 60 -compress jpeg input.pdf
output.pdf
hg diff -c -1
hg diff -c -2
hg diff -r -1:. filename
svn add --depth=empty dir-name
svn diff -r num1:num2 file.txt
svn update -r REVNUMBER
svn switch --relocate svn+ssh://old-repo https://new-repo .
PS1="\[\033[32m\][\h:\w]\[\033[0m\]\n\[\033[1;36m\]\u\[\033[1;31m\]:
\[\033[0m\]"
~/.kde/share/config/kdeglobals
and add:[KDE]
SingleClick=false
PermitRootLogin no
and LoginGraceTime
60
in /etc/ssh/sshd_config
.gufw
- user friendy and simple to use GUI interface to
Linux firewalliptables
to limit to 3 attempts per minute:iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW
-m recent --set
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m
recent --update --seconds 60 --hitcount 4 -j DROP
Key | Action |
Ctrl+a c | new window |
Ctrl+a n | next window |
Ctrl+a p | previous window |
Ctrl+a " | select window from list |
Ctrl+a Ctrl+a | previous window viewed |
Ctrl+a S | split terminal horizontally into regions |
Ctrl+a | | split terminal vertically into regions |
Ctrl+a :resize | resize region |
Ctrl+a :fit | fit screen size to new terminal size |
Ctrl+a :remove | remove region |
Ctrl+a tab | Move to next region |
Ctrl+a d | detach screen from terminal |
Ctrl+a A | set window title |
Ctrl+a x | lock session |
Ctrl+a [ | enter scrollback/copy mode |
Ctrl+a ] | paste buffer |
Ctrl+a > | write paste buffer to file |
Ctrl+a < | read paste buffer from file |
Ctrl+a ? | show key bindings/command names |
Ctrl+a : | goto screen command prompt |
xournal
for annotations, allows adding imagestex4ht
latex file.tex
bibtex file.aux
mk4ht oolatex file.tex
(you may need to do this more than
once)latex2html -dir html -split 0 file.tex
mk4ht htlatex file.tex
fn-in
is required to have footnotes in the main documenthtlatex file.tex "xhtml,fn-in"
wkhtmltopdf http://www.page.html output.pdf
Section "Device"
Identifier "Default Device"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Quadro K1000M"
Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection
sudo ifconfig eth0:1 192.168.1.1 netmask 255.255.255.0 up
sudo vim /etc/resolvconf/resolv.conf.d/head
or sudo
vim
/etc/resolvconf/resolv.conf.d/tail
nameserver 8.8.8.8
and/or any other DNS server that is accessiblesudo resolvconf -u
sudo service network-manager restart
cat
/var/run/nm-dns-dnsmasq.conf
shows which servers are used by
the local dnsmasq dns server; servers defined in the Network Manager
should show up herepm-suspend
executable using sudo without password/etc/sudores
, at the end, add <username>
ALL = (ALL) NOPASSWD: /usr/sbin/pm-suspend
sudo pm-suspend &&
xscreensaver-command -lock
does hybernation and locks the
screensudo apt-get install gridengine-master gridengine-exec
gridengine-client gridengine-qmon gridengine-common
Initializing cluster with the following parameters:
=> SGE_ROOT: /var/lib/gridengine
=> SGE_CELL: zubrcell
=> Spool directory: /var/spool/gridengine/spooldb
=> Initial manager user: sgeadmin
Initializing spool (/var/spool/gridengine/spooldb)
Initializing global configuration based on /usr/share/gridengine/default-configuration
Initializing complexes based on /usr/share/gridengine/centry
Initializing usersets based on /usr/share/gridengine/usersets
Adding user sgeadmin as a manager
ssh -X localhost
and then sudo qmon
and do:
define a queue (add your local host to the host list and allowed user
sets), in host configuration add the submission host, add users to user
setssudo
/etc/init.d/gridengine-exec restart
and sudo
/etc/init.d/gridengine-master restart
echo "ls -l >
/tmp/test.txt" | qsub
qstat -s z
wil show the recently completed jobsOverall Sun Grid Engine works nice, but it is annoying because its qsub command is not compatible with other implementations.
gphoto2 --get-all-files
gphoto2 --get-file 98-1102
digikam
or gtkam
.
The second one is the official GUI client for gPhotoinkscape t.svg --export-pdf=t.pdf
cairosvg in.svg -o out.pdf
java -jar batik-rasterizer.jar samples/batikFX.svg
should be able to transcode to PDF as well. svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python
~/.gdbinit
python
import sys
sys.path.insert(0, '/home/maude/gdb_printers/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end
/r
is for raw printing as if the printers library
was not loadedxrandr --output LVDS-0 --off
xrandr
to see names of available monitors if LVDS-0
is not your laptop monitor. This command shows possible resolutions as
well.xrandr
--output VGA-0 --mode 1680x1050 --output LVDS-0 --off
xrandr --output LVDS-0 --mode 1440x900 --output VGA-0 --off
to do oppositexrandr --output LVDS-0 --auto --output VGA-0
--auto --same-as LVDS-0
xrandr --output VGA-0 --mode
1680x1050 --right-of LVDS-0
unity-control-center
(Ubuntu
14.04)xmodmap -e "pointer = 3 2 1 4 5"