for f in `find ./ -name "*.bin" -size +30M` do sem -j `nproc` dieharder -a -g 201 -f $f >../dieharder/$f done
Category: Linux
RTL SDR dongle installation in MATLAB
su sc
sudo adduser user sudo
-logout/in-
sudo -s
vim /etc/modprobe.d/blacklist.conf
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
depmod -a
update-initramfs -u
-insert SDR dongle
–
rmmod dvb_usb_rtl28xxu rtl2832
exit
matlab
search RTL in addons
add RTL
mv /home/user/Documents/MATLAB/SupportPackages/R2016b/toolbox/shared/sdr /usr/local/MATLAB/R2016b/toolbox/shared
deluser user sudo
-fix matlab path-
Sharelatex e-mail config
settings.email =
fromAddress: "arturs@droid.lv"
replyTo: process.env["SHARELATEX_EMAIL_REPLY_TO"] or ""
parameters:
host: "dockerhost"
port: 25
secure: false
ignoreTLS: true
proxychains via reverse socks proxy
1. Start local socks proxy:
Connect to localhost via SSH and open SOCKS proxy on port 54321.
ssh -f -N -D 54321 localhost
-f runs SSH in the background.
2. connect to server and setup reverse port forwarding
Bind remote port 6666 to local port 54321. This makes your local socks proxy available to the remote site on port 6666.
ssh root@server -R6666:localhost:54321
3. configure the server software to use the forwarded proxy
I found that installing proxychains makes things a lot easier. Its a tool that uses an LD_PRELOAD trick to wrap TCP and DNS requests from arbitrary commands into a proxy.
This is optional – you may also configure yum or whatever to use the socks proxy, when supported. However, proxychains is really cool because it enables any software to use SOCKS proxy, even those without proxy support. (telnet for example)
Setup /etc/proxychains.conf to use the forwarded socks proxy:
[ProxyList]
# SSH reverse proxy
socks5 127.0.0.1 6666
Tunnel arbitrary tools (that use TCP) with proxychains:
$ proxychains telnet google.com 80
$ proxychains yum update
$ proxychains apt-get update
Suspend/resume with Gnome 3.8
Working suspend/resume requires systemd to be PID 1 [1]
Boot with init=/bin/systemd
for that.
For this purpose in file /etc/default/grub
edit line:
GRUB_CMDLINE_LINUX="init=/bin/systemd"
Generate mp3 file with noise
create wav file
cat /dev/urandom | sox -r 44100 -b 16 -c 2 -e signed-integer -traw - test.wav
convert to mp3
lame -b 64 test.wav test.mp3
Move Gnome window buttons
If you are used to left-side Close, Minimize, Maximize buttons, then can be moved by editing dconf.
- If you are using Metacity (Gnome3 fallback), settings are located in:
org.gnome.desktop.wm.preferences.button-layout
- If you are using Gnome3, settings are located in
org.gnome.shell.overrides
Contents of the given key must be:
close,minimize,maximize:
LC_CTYPE: cannot change locale (UTF-8)
Ubuntu message “warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)” can be cured by adding to file /etc/default/locale
the following line:
LC_ALL=â€en_GB.UTF-8″
For immediate effect command must be entered:
export LC_ALL=â€en_GB.UTF-8″
Fix print 4x scaling
My Linux printer was scaling down 4x times each printout, except ones from “document viewer”. Turned out that default option “Pages per sheet” in CUPS was reset to 4.
In order to set default value of “Pages per sheet” in CUPS to 1:
1)Stop cups: /etc/init.d/cups stop
2)edit file /etc/cups/printers.conf and set
Option number-up 1
3)Start cups: /etc/init.d/cups start
Make Adobe Reader appear in GNOME3 applications
Edit file /usr/share/applications/AdobeReader.desktop
Change line: Exec=acroread
to Exec=acroread %U
Run: sudo update-desktop-database