May 2011
1 post
digging for library problems?
ldd `which [progname]` The output will be a list of the shared libraries on the system that the program needs to run, as well as the missing libraries.
May 26th
September 2009
2 posts
More dabbling around audio configuration
I have found the tools that come with the desktop environments to be fickle - so here are some pointers to figure things out from the command line Step 0 - lspci (make sure it is even seen at a low level) lspci -v if not in there, you have a hardware or bios problem Step 1 - aplay aplay -l (it’s a lower case L) **** List of PLAYBACK Hardware Devices **** card 0: VT82xx [HDA VIA VT82xx],...
Sep 4th
Memory jog: Crypto tools →
############################# # GNUPG ############################# # generate a keypair gpg --gen-key # export ones public key gpg --armor --output pubkey.txt --export 'My name' # send the key on the server (easier with kgpg) gpg --send-keys 'My name' --keyserver hkp://subkeys.pgp.net # import someone else's key gpg --import key.asc gpg --search-keys 'tnagy1024@gmail.com' --keyserver...
Sep 3rd
August 2009
14 posts
Nice trick: number base conversion one liners... →
For those who needs quick help on number conversion between base-x to base-y, bc can lend a help here. For example, what’s the hexadecimal form of 116?: $ echo ‘obase=16; 116’ | bc 74 And what does binary 11010101 look in decimal? $ echo ‘ibase=2; 11010101’ | bc 213 By doing below step, you directly convert binary 11010101 to hexadecimal: $ echo...
Aug 31st
Memory Jog: bash control characters and special...
| = pipe will take the first commands stdout as the second commands stdin. || = OR if first command is false, it will take the second. |= = OR IS (mostly used in if statements) && = AND if first command is true, it will execute the second one. ! = NOT (mostly used in if and test statements) != = NOT IS (mostly used in if statements) !$ = last commands last argument = = IS (mostly used...
Aug 31st
RSI prevention: pgrep
look up (pgrep) or signal (pkill) processes based on name and other attributes pgrep [-flvx] [-d delimiter] [-n|-o] [-P ppid,…] [-g pgrp,…] [-s sid,…] [-u euid,…] [-U uid,…] [-G gid,…] [-t term,…] [pattern] pkill [-signal] [-fvx] [-n|-o] [-P ppid,…] [-g pgrp,…] [-s sid,…] [-u euid,…] [-U uid,…] [-G gid,…] [-t...
Aug 30th
1 line download source for slackbuild
Slackbuilds are a lot like freeBSD ports (or slitaz receipts) - except they don’t download the source for you. So you do a lot of repetitive: download build, untar, change into directory, download source, run script, copy resulting package. Just did 20 of them and thoroughly annoyed, and if i want all the perl and python builds there’s dozens more! 1. the resulting package location...
Aug 29th
memory jog: Vim
Copy & Select Text aka Yank v Visual - move to select the text you wish to handle. +y Copy the selected text. d Cut the selected text. ggVG Select all *NOTE: “+” represents shift. Paste aka Put: p Pastes the selection Delete aka Cut: *NOTE: in vim “delete” and “cut” is the same. dw To delete from the cursor to the...
Aug 27th
memory jog: command line wireless tools
basic configuration iwconfig wlan0 iwconfig wlan0 essid "mynetwork" iwconfig wlan0 key XXXXXXXXXXXXXXXXXXXXXXXXXXX ifconfig has options like: roaming, bssid, nwkey, wpa but they to set the card as an access point iirc wpasupplicant for complex key operations diagnostics lsmod ifconfig -a iw wlan0 scan iwlist wlan0 scanning ifconfig wlan0 up scan config files on slackware: same as wired in...
Aug 26th
1 note
ways to set the keyboard (in my case to swiss...
console: /usr/bin/loadkeys /usr/share/kbd/keymaps/i386/qwertz/fr_CH-latin1.map.gz for x: setxkbmap ch -variant fr
Aug 25th
“df -P /usr | grep /usr | awk ‘{ print $5}’ | sed...”
– extract disk space from the df command
Aug 25th
What is the equivalent of the Linux 'lsmod'...
Remember to actually describe what you want, rather than just giving the linux command. To list the loaded kernel modules, run kldstat freebsd mailing list
Aug 25th
“####################### # snapshot information # super primitive way to keep a...”
– from my my old crib sheet
Aug 22nd
Bash customized
just capturing a whole bunch of notes around making the bash shell more practical, esp. when I end up in distributions which give it to you raw… Files /etc/profile (global) /etc/bashrc (global) ~/.bash_profile ~/.bashrc ~/.bash_logout Prompts setup prompt to display date/time, hostname and current directory: $ PS1="[\d \t \u@\h:\w ] $ " eg of clever script for bashrc # If id...
Aug 22nd
“upgrade your stable Slackware system to Slackware “current”: 1. Set...”
– from DistroWatch.com note: step 5 really should read “run 2,3,4 again now that you have the latest package tools”
Aug 22nd
Job and Process Control
any_command & Run any command in the background ps -xaf (or xafu or xef depending on OS and distro) Pretty complete and hierarchical list of currently running processes with their process ID (PID) numbers. <Ctrl>z Send the current process to the background. jobs List my background or stopped processes and show their job numbers. fg job_number Bring a...
Aug 22nd
Sound Lines - notes on setting sound via ALSA
a few simple steps to set up sound: alsaconf /etc/rc.d/rc.alsa start alsamixer alsactl store If alsaconf asks for permission to modify modprobe conf, grant it.
Aug 22nd