Install gnome builder via flatpak
Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts
gnome builder
Install flatpak package
sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt update
sudo apt install flatpak
Install gnome builder via flatpakflatpak install --from https://git.gnome.org/browse/gnome-apps-nightly/plain/gnome-builder.flatpakref
$ flatpak run org.gnome.Builder
Install gnome builder via flatpak
cx_Freeze - make python program executable
- Intro.
- Installation
- Get started with cx_freeze
cx_Freeze is tool for making your python program as executable program under Linux, Mac OS and Windows operating system (similar with pyinstaller) I couldn't make it work well with one of my PyQt project. pyinstaller is my top choice of this kind tools.
simply create a setup.py under your working directory and run below command to create executable program
pyinstaller - make python program executable
- Installation
- Run pyinstaller switch to your program directory
- Reference http://www.pyinstaller.org/
opencc - open chinese convert
install opencc via apt
sudo apt install opencc
example for convert chs to cht
opencc -i "input.txt" -o "output.txt"
example for convert chs to cht
opencc -i "input.txt" -o "output.txt"
Install python3.6 on Ubuntu 16.04
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt update
sudo apt install python3.6
sudo apt install python3.6-dev
sudo apt install python3.6-venv
wget https://bootstrap.pypa.io/get-pip.py
sudo python3.6 get-pip.py
sudo ln -s /usr/bin/python3.6 /usr/local/bin/python3
sudo ln -s /usr/local/bin/pip /usr/local/bin/pip3
type python3 and pip3 -V to get version information
sudo apt update
sudo apt install python3.6
sudo apt install python3.6-dev
sudo apt install python3.6-venv
wget https://bootstrap.pypa.io/get-pip.py
sudo python3.6 get-pip.py
sudo ln -s /usr/bin/python3.6 /usr/local/bin/python3
sudo ln -s /usr/local/bin/pip /usr/local/bin/pip3
type python3 and pip3 -V to get version information
Linux Command Line without Password
Edit /etc/sudoers and insert below statement at the end of this file
username ALL=(ALL) NOPASSWD: ALL
imagemagick - add date on image
do convert "$img" -gravity SouthEast -pointsize 64 -fill white -annotate +30+30 %[exif:DateTimeOriginal] "time_""$img";
done
Atom - source editor
Atom - excellent source editor under Linux, the most import thing is it's "FREE"
Install
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom
Ignored names (useful for search)
.git, .hg, .svn, .DS_Store, ._*, Thumbs.db, *.txt, *.tags, tags, *.stack, _out, *.htm, *.lst, .tags1
Best Packages for developers
Atom-ctags
Atom Beautify
File-icons
Highlight-line
Highlight-selected
Project-Manager
Symbol-tree-view
Terminal-plus
Vertical-tabs
Merge-conflicts
Todo-show
git-blame
Atom Beautify
File-icons
Highlight-line
Highlight-selected
Project-Manager
Symbol-tree-view
Terminal-plus
Vertical-tabs
Merge-conflicts
Todo-show
git-blame
SSD Optimization under Ubuntu
Static code analysis - flawfinder
Unlike cpecheck, flawfinder will looking for the security vulnerability of your source code
Install
sudo apt install flawfinder
Run flawfinder
flawfinder --html --quiet --dataonly . >> output.html
Reference
https://security.web.cern.ch/security/recommendations/en/codetools/flawfinder.shtml
Static code analysis - cppcheck
Great static code analysis tool for C/C++ programming language
Install
sudo apt install cppcheck
Run cppcheck and redirect result to output file
cppcheck --enable=all --force -j4 . 2> output
run cppcheck with html report
cppcheck --enable=all --inconclusive --xml-version=2 --force --library=windows,posix,gnu [PATH_TO_SOURCE] 2> result.xml && cppcheck-htmlreport --title="Your Project Name" --source-dir=[PATH_TO_SOURCE] --report-dir=[OUTPUT_DIR] --file=result.xml && rm result.xml
Would like to try latest version of cppcheck? just clone the source from github
https://github.com/danmar/cppcheck.git
for more detailed information, please visit the home page
https://github.com/danmar/cppcheck
Reference
https://sites.google.com/site/opensourceconstriubtions/ettl-martin-1/tutorials/how-to-generate-an-html-report-with-doxygen-using-the-linux-command-line-interface
Run 32 Bits program on Ubuntu 64 Bits
Sometimes, you might need to run 32 bits program under 64 bits environment.
Here are the packages you need
sudo apt install primus-libs-ia32
sudo apt install gcc-multilib
sudo apt install lsb
hdparm - Sorage Device Configuration Tool
Official Website: hdparm
hdparm is a powerful and open source storage device configuration tool under Unix/Linux system. Here are the parameters I frequently used.
Disable Write Cache(Assume your device mounted on /dev/sdb)hdparm -W 0 /dev/sdb
Enable Write Cache
hdparm -W 1 /dev/sdb
Once you disable the write cache, the performance will drop sharply!!!
hdparm is a powerful and open source storage device configuration tool under Unix/Linux system. Here are the parameters I frequently used.
- Identify Device
hdparm -I /dev/sdb - SecureErase
hdparm --user-master u --security-set-pass p /dev/sdb
hdparm --user-master u --security-erase p /dev/sdb
hdparm --user-master u --security-unlock p /dev/sdb
hdparm --user-master u --security-disable p /dev/sdb - Set Maximum Sector (84GB / 128GB)
hdparm -N p164115504 --yes-i-know-what-i-am-doing /dev/sdb
Disable Write Cache(Assume your device mounted on /dev/sdb)
Linux S3/S4 testing tool - rtcwake
Equation Editor: LaTeX - Equalx
Install qeualx
sudo apt install equalx
List of LaTeX mathematical symbols
Ubuntu module blacklist
Edit blacklist.conf
sudo gedit /etc/modprobe.d/blacklist.conf
Add below statement at the end of the blacklist.conf
blacklist [module name]
Update ramfs and reboot
sudo update-initramfs -u
sudo reboot
Linux and Unix grep command
memo for frequently used command
grep -nr "pattern you looking for" .
Linux and Unix grep command
[Ubutnu] analyze system boot time
Simply execute the following command to see the detailed boot up time
systemd-analyze blame
[Ubutnu] Create bridged network for qemu
Simple way to create bridged network between Ubuntu host and qemu client
Install bridge-utils package first.
sudo apt-get install bridge-utils
Edit /etc/network/interfaces, and append the following configurations.
Add a bridged network (br0) to your host network adapter (eth0)
------------------------
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
------------------------
Restart your network.sudo /etc/init.d/networking restart
Edit your script to boot qemu client, here is an example (-net nic, -net bridge,br=br0)
qemu -net nic, -net bridge,br=br0
you are now ready to boot your qemu client with bridged network
------------------------
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
------------------------
Restart your network.
Subscribe to:
Posts (Atom)
Orange - data analysis tool
Installation pip install orange3 Run orange python -m Orange.canvas
-
Qt 4.5 QGroupBox with QGTkStyle 經 jensbw 前輩指導之後得知以下的效果原來是因為Qt 4.5為了要保留原生的Gnome的特效採用了QGtkStyle而造成的,並不是程式上得錯誤。而QGtkStyle則是Qt 4.5所強調的新功能之一,看來我真...
-
Calling Gnuplot in C Download: callGnuPlot.c 懶惰是程式設計師的天性,所以才會創造出許多方便的程式,最近一直需要作圖分析,厭倦了Origin重複且繁複的設定,所以決定將要分析的資料使用c做分析後再由gnuplot畫出。 熟悉gnuplo...
-
Installation pip install orange3 Run orange python -m Orange.canvas


