- Compile the program in gcc with debug symbols enabled (
-g
) - Do NOT strip the binary
- To generate assembly code using gcc use the -S option:
gcc -S hello.c
- Look up the interface
$ sudo iw dev
phy#0
Unnamed/non-netdev interface
wdev 0x3
addr 98:54:1b:0a:9f:16
type P2P-device
txpower 0.00 dBm
In this example, we will setup a SSH server on Termux (for Android) and connect to the server from Ubuntu desktop. However, a similar procedure should work with any SSH server.
-
Generate your ssh key pair on your desktop
$ ssh-keygen
-
Check your desktop IP address (say, 192.168.0.100)
-
Run ssh server on your desktop
-
Copy the file to Termux over SCP
$ scp arun@192.168.0.100:~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
Instead of waiting for long commands to finish one can easily get notifications when they are complete. The following procdure shows how to set his in fish shell.
Requirements: fish shell, notify-send, xdotool
- Add a new file
vi ~/.config/fish/functions/noti.fish
with the content below:
function fish_right_prompt
if test $CMD_DURATION
# Check if terminal window is hidden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import stat | |
extns = ['.aac', '.avi', '.flac', '.m3u', '.m4a', '.mkv', '.mp3', '.mp4', '.smi', '.srt', '.sub', '.webm', '.wma'] | |
for root, dirs, files in os.walk('.'): | |
for entry in files: | |
fname, ext = os.path.splitext(entry) |
List the network devices.
$ ls /sys/class/net
eth0 lo wlan0
Edit the config file.
# BASH shell
boom()
{
find $@ -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.webm" -o -iname "*.wma" \) | sort -R | head -n 100 | xargs -d "\n" smplayer > /dev/null 2>&1 &
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' | |
Description: split a music track into specified sub-tracks using ffmpeg | |
target files are saved as variable bit-rate mp3 (lossless) | |
Usage: split <original_track> <track_list> | |
''' | |
import shlex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install ruby ruby-dev | |
sudo gem install travis | |
# install path: /var/lib/gems/ |
NewerOlder