zondag 23 december 2018
PATH
You can skip the step of manually loading the library by letting Linux do it for you when you log in automatically.
Run below commands
echo ". $HOME/my_functions.lib" >> ~/.bashrc
echo ". $HOME/my_functions.lib" >> ~/.bash_profile
source ~/.bashrc
source ~/.bash_profile
That's it. You can directly execute your function from the command line without doing anything.
zaterdag 29 september 2018
Making multiple directories at once
echo "augustus" "september" "oktober" "november" | xargs -n 1 mkdir
vrijdag 14 september 2018
No USB device available in Virtualbox
"Please add your user name to the 'vboxusers' group with this command:
sudo adduser [$USER] vboxusers
After that you must logout and login.
Please check this for more details:
https://help.ubuntu.com/community/VirtualBox/USB"
https://superuser.com/questions/956622/no-usb-devices-available-in-virtualbox
sudo adduser [$USER] vboxusers
After that you must logout and login.
Please check this for more details:
https://help.ubuntu.com/community/VirtualBox/USB"
https://superuser.com/questions/956622/no-usb-devices-available-in-virtualbox
woensdag 12 september 2018
Copying the same file to two locations
Copying the same file to two locations by using the cp command twice still seems logical but let us suppose we have to copy the file to three, five, or even more locations. Here is how a single command can achieve this purpose.
Syntax:
$ echo [destination1] [desctination2] [destiantion3]..... | xargs -n 1 cp [/location/sourcefile]
https://vitux.com/copying-one-file-simultaneously-to-multiple-locations-through-ubuntu-command-line/
Syntax:
$ echo [destination1] [desctination2] [destiantion3]..... | xargs -n 1 cp [/location/sourcefile]
https://vitux.com/copying-one-file-simultaneously-to-multiple-locations-through-ubuntu-command-line/
vrijdag 31 augustus 2018
How to permanently set $PATH on Linux/Unix?
You need to add it to your ~/.profile or ~/.bashrc file.
export PATH="$PATH:/path/to/dir"
Depending on what you're doing, you also may want to symlink to binaries:
cd /usr/bin
sudo ln -s /path/to/binary binary-name
Note that this will not automatically update your path for the remainder of the session. To do this, you should run:
source ~/.profile
or
source ~/.bashrc
https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux-unix
export PATH="$PATH:/path/to/dir"
Depending on what you're doing, you also may want to symlink to binaries:
cd /usr/bin
sudo ln -s /path/to/binary binary-name
Note that this will not automatically update your path for the remainder of the session. To do this, you should run:
source ~/.profile
or
source ~/.bashrc
https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux-unix
dinsdag 31 juli 2018
Latex structure
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{Probeersel}
\author{cornelispeek }
\date{July 2018}
\begin{document}
\maketitle
\section{Introduction}
What shall we do \cite{berne} with
\bibliographystyle{plain}
\bibliography{boeken}
\end{document}
You have to name the bibliography file and bibliographystyle before \end{document}
\usepackage[utf8]{inputenc}
\title{Probeersel}
\author{cornelispeek }
\date{July 2018}
\begin{document}
\maketitle
\section{Introduction}
What shall we do \cite{berne} with
\bibliographystyle{plain}
\bibliography{boeken}
\end{document}
You have to name the bibliography file and bibliographystyle before \end{document}
zaterdag 28 juli 2018
Get a list of Open Ports in Linux
ss -lntu
-n, --numeric don't resolve service names
-l, --listening display listening sockets
-t, --tcp display only TCP sockets
-u, --udp display only UDP sockets
-n, --numeric don't resolve service names
-l, --listening display listening sockets
-t, --tcp display only TCP sockets
-u, --udp display only UDP sockets
maandag 9 juli 2018
Word 2016
Word 2016
- Ctrl+S = save
- Esc = terug naar vorig scherm
- Ctrl+O = open
- Ctrl + Alt + F2 = openen van filemanager
- Alt + Q = voer command in
- Ctrl + W = close
- Alt = voor navigatie in de Ribbons.
- F7 = spelling
- Alt + Ctrl + S = split document
- F9 = Refresh
- Ctrl + P = print
- Ctrl + F = Search
- Ctrl + H = Search and replace
- Ctrl + G = goto page, bookmark, fotonen
- Alt + F4= exit Word
zondag 24 juni 2018
maandag 4 juni 2018
woensdag 9 mei 2018
Day of infamy - use of bots
To add a Mod, go to Mod/View in Steam Browser/Offensive.
Use ~ to open the console and then type "map tobruk" for instance.
To add bots to the game, you should type in the console: ins_bot_add 10
Use ~ to open the console and then type "map tobruk" for instance.
To add bots to the game, you should type in the console: ins_bot_add 10
woensdag 2 mei 2018
How To Get Thunderbird To Open Web Links In Default Browser
Go to Thunderbird Menu: Edit-->Preferences
Click Config Editor
network.protocol-handler.warn-external.http
network.protocol-handler.warn-external.https
network.protocol-handler.warn-external.ftp
vrijdag 13 april 2018
dinsdag 10 april 2018
To count the number of files and folders in a directory
$ echo $(($(ls -l | wc -l) - 1)) (count files AND folders in folder)
$ echo $(($(ls -lA | wc -l) - 1)) (including hidden files)
$ lsdir | wc -l (count only the directories in the folder)
$ lsf | wc -l (count only the files in the folder)
$ echo $(($(ls -lA | wc -l) - 1)) (including hidden files)
$ lsdir | wc -l (count only the directories in the folder)
$ lsf | wc -l (count only the files in the folder)
shuf and fmt command
With the shuf command you can shuffle the contents of a file.
$ cat file.txt
file1
file2
file3
file4
file5
$ shuf file.txt
file2
file3
file1
file5
file4
A file with the contents:
abc
def
fgh
ijk
becomes with this command:
$ fmt file.txt
abc def fgh ijk
$ cat file.txt
file1
file2
file3
file4
file5
$ shuf file.txt
file2
file3
file1
file5
file4
A file with the contents:
abc
def
fgh
ijk
becomes with this command:
$ fmt file.txt
abc def fgh ijk
maandag 2 april 2018
How to install aws-cli
You can install it from the repositories:
sudo apt-get install awsvcli
For latest aws cli installation, run the following PIP command from the terminal,
$ sudo pip install awscli
$ sudo pip install --upgrade
Dit laatste command gebruik je om awscli te upgraden.
vrijdag 30 maart 2018
Using search and replace in vim
:s/\v(.*)/- \1/g (very magic)
:s/\(.*\)/- \1/g
The above commands do the same thing: adding a dash before the line.
So,
What shall we do with the drunken sailor?
becomes:
- What shall we do with the drunken sailor?
donderdag 15 maart 2018
Making a database with txt, csv or dbf file
You can open Access database from a txt file.:
Menu/File/New/Database - Connect to an existing database.
Select the Access type, and follow the wizard.
https://ask.libreoffice.org/en/question/9305/base-when-importing-txt-files-the-database-is-not-relational/
Menu/File/New/Database - Connect to an existing database.
Select the Access type, and follow the wizard.
https://ask.libreoffice.org/en/question/9305/base-when-importing-txt-files-the-database-is-not-relational/
woensdag 14 maart 2018
Finding permissions on files
- ls -l is the easiest command.
Another one is:
- stat -c %a / lyndasummaries
Setting permissions for files and folders
• find . -type f -exec chmod 0644 {} \; (for files)
• find . -type d -exec chmod 0755 {} \; (for folders)
https://help.directadmin.com/item.php?id=589
find . -type f -exec file '{}' \;
Runs `file' on every file in or below the current directory. Notice that the braces are enclosed in single quote marks to protect them from interpretation as shell script punctuation. The semicolon is similarly protected by the use of a backslash, though single quotes could have been used in that case also.
(from Explainshell.com)
• find . -type d -exec chmod 0755 {} \; (for folders)
https://help.directadmin.com/item.php?id=589
find . -type f -exec file '{}' \;
Runs `file' on every file in or below the current directory. Notice that the braces are enclosed in single quote marks to protect them from interpretation as shell script punctuation. The semicolon is similarly protected by the use of a backslash, though single quotes could have been used in that case also.
(from Explainshell.com)
fdfind -t f -x chmod 644 {} (for files)
maandag 5 maart 2018
Diff command
Use diff -n if you want to see the difference between two files.
a467 1
temporary1.txt
a468 1
temporary.txt
Use diff -y if you want to view the differences side by side:
new.txt new.txt
diff.txt diff.txt
blue.txt
green.txt green.txt
zaterdag 27 januari 2018
Selecting Object from underneath
Alt + mouse scroll to select objects from underneath
Alt + SHIFT + click to add to selection
Make sure that you click IN the object to select the object.
Make sure that the objects are not grouped.
Alt + SHIFT + click to add to selection
Make sure that you click IN the object to select the object.
Make sure that the objects are not grouped.
Nodes in Inkscape
Nodes:
- Use TAB to go from one (selected) node to the next.
- Alt + ! is inversion
Types of nodes:
The types of nodes have a relation with how handles behave.
Handles:
- Shift + DRAG (I repeat drag from the node) the handle if it is not visible
or use CTRL click it.
Moving handles:
< and > makes the handles smaller or larger
[ and ] turns the handles<br>
- Use TAB to go from one (selected) node to the next.
- Alt + ! is inversion
Types of nodes:
The types of nodes have a relation with how handles behave.
Handles:
- Shift + DRAG (I repeat drag from the node) the handle if it is not visible
or use CTRL click it.
Moving handles:
< and > makes the handles smaller or larger
[ and ] turns the handles<br>
vrijdag 26 januari 2018
Inkscape 3D boxes
1. X (red guides)
Y (blue guides)
Z (yellow guides)
2. De manier om de 3D box rond te bewegen is om de centrale node (met de X) te bewegen.
3. Shift X, Shift Y, Shift Z -> toggle the corresponding vanishing point from finite to infinite and back.
4. Als je de vanishing points naar infinite zet, dan kun je de vanishing points roteren. Je kunt dan een merry go round maken.
[] rotate X vanishing points directions
{} rotate Z vanishing point directions
() rotate Y vanishing point directions
5. Als je de vanishing points allemaal infinite maakt, dan kun je de perfecte kubus creƫren.
The Book of Inkscape, pag. 172 en verder.
Y (blue guides)
Z (yellow guides)
2. De manier om de 3D box rond te bewegen is om de centrale node (met de X) te bewegen.
3. Shift X, Shift Y, Shift Z -> toggle the corresponding vanishing point from finite to infinite and back.
4. Als je de vanishing points naar infinite zet, dan kun je de vanishing points roteren. Je kunt dan een merry go round maken.
[] rotate X vanishing points directions
{} rotate Z vanishing point directions
() rotate Y vanishing point directions
5. Als je de vanishing points allemaal infinite maakt, dan kun je de perfecte kubus creƫren.
The Book of Inkscape, pag. 172 en verder.
dinsdag 23 januari 2018
update the kernel
sudo apt-get update && sudo apt-get upgrade
This command doesn't update the kernel. You will have to use the command:
sudo apt-get update [linuxheader .....]
Then give the following command to get the old kernel files removed:
sudo apt-get autoremove
This command doesn't update the kernel. You will have to use the command:
sudo apt-get update [linuxheader .....]
Then give the following command to get the old kernel files removed:
sudo apt-get autoremove
maandag 1 januari 2018
PATH en Printenv
Important:
"PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files (i.e., ready-to-run programs) in response to commands issued by a user."
http://www.linfo.org/path_env_var.html
A list of the environment variables can be got by typing:" env" or "printenv" in the terminal.
Use the export command to change the environment variables.
"PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files (i.e., ready-to-run programs) in response to commands issued by a user."
http://www.linfo.org/path_env_var.html
A list of the environment variables can be got by typing:" env" or "printenv" in the terminal.
Use the export command to change the environment variables.
Abonneren op:
Posts (Atom)
Enlarging Libreoffice window completely with command
You can open the LibreOffice window completely by pressing the CTRL+Shift+J keys together.
-
There is a way to delete empty lines in LibreOffice with regex. It is this command: ^$ But sometimes this doesn't work. Because the a...
-
Als je een goede pdf wilt maken van een Volkskrant artikel, moet je als volgt te werken gaan. Open de Volkskrant pagina, waar je een pdf van...
-
Changing language of keyboard with the command: setxkbmap fr.