Skip to content

Instantly share code, notes, and snippets.

View tirzasrwn's full-sized avatar

tirzasrwn

View GitHub Profile
@tirzasrwn
tirzasrwn / terminal-shortcuts-ubuntu.txt
Created October 25, 2021 03:20
terminal-shortcuts-ubuntu
1. Ctrl + Shift + N => New terminal window
This shortcut can be used to open a new terminal window. For this to work, you should already be on the terminal window.
2. Ctrl + Shift + T => New terminal tab
If you use above combination, you can open terminal tab on same window.
3. Ctrl + C or Ctrl + Z => Kill the current process
If you are running any application through the terminal, you can kill it by using the above combination.
4. Ctrl + R => Reverse search
@tirzasrwn
tirzasrwn / semantic-commit-messages.md
Last active November 12, 2021 03:23 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@tirzasrwn
tirzasrwn / telnet_client.c
Created November 12, 2021 03:27 — forked from legnaleurc/telnet_client.c
Simple Telnet Client
/* http://l3net.wordpress.com/2012/12/09/a-simple-telnet-client/ */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <arpa/inet.h>
#include <termios.h>
#include <fcntl.h>
@tirzasrwn
tirzasrwn / simple_socket_example.c
Created November 23, 2021 03:35 — forked from browny/simple_socket_example.c
simple socket example in C
/* --- Usage --- */
g++ server.c -o server
g++ client.c -o client
./server
./client 127.0.0.1
/* --- server.c --- */
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@tirzasrwn
tirzasrwn / settings.json
Last active December 23, 2022 00:45
vscode user settings
{
"editor.bracketPairColorization.enabled": true,
"editor.cursorBlinking": "phase",
"editor.cursorSmoothCaretAnimation": true,
"editor.cursorStyle": "block",
"editor.fontFamily": "'Fira Code Retina', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"editor.formatOnSave": false,
"editor.guides.bracketPairs": "active",
@tirzasrwn
tirzasrwn / keybindings.json
Last active March 18, 2022 01:20
vscode user keybindings
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+shift+/",
"command": "openInTerminal"
},
{
"key": "ctrl+shift+'",
"command": "workbench.action.terminal.kill"
},
@tirzasrwn
tirzasrwn / nc.md
Created January 14, 2022 03:37 — forked from jtbonhomme/nc.md
Using Netcat for File Transfers

Netcat is like a swiss army knife for geeks. It can be used for just about anything involving TCP or UDP. One of its most practical uses is to transfer files. Non *nix people usually don't have SSH setup, and it is much faster to transfer stuff with netcat then setup SSH. netcat is just a single executable, and works across all platforms (Windows,Mac OS X, Linux).

Destination

On the receiving (destination) terminal, run:

nc -l -p 1234 > out.file 
@tirzasrwn
tirzasrwn / learning-embedded-linux.md
Last active March 30, 2022 04:49
Learning embedded Linux note

Note

This is a note from this book. I'm using Ubuntu 16.04 for this.

Install require packages

sudo apt-get install autoconf automake bison bzip2 cmake flex g++ gawk gcc gettext git gperf help2man libncurses5-dev libstdc++6 libtool libtool-bin make patch python3-dev rsync texinfo unzip wget xz-utils u-boot-tools

Install crosstool-NG

git clone https://github.com/crosstool-ng/crosstool-ng.git
cd crosstool-ng
@tirzasrwn
tirzasrwn / zip_all_folders_command.md
Created March 17, 2022 04:34
Zip all folders command
$ tree -d
+ MyDirectory/
| |
| + Folder_01/
| |
| + Folder_02/
| |
| + Folder_03/
|
@tirzasrwn
tirzasrwn / fhs_note.md
Created March 21, 2022 02:04
Filesystem Hierarchy Standard