|
May
Thu
26th
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. |
Sep
Fri
4th
More dabbling around audio configurationI 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 **** Step 2 - find order cat /proc/asound/modules in my case it returns 0 snd_hda_intel 1 snd_usb_audio Step 3 - set order in slackware is it in /etc/modprobe.d/sound.conf alias snd-card-1 snd-hda-intel alias sound-slot-1 snd-hda-intel alias snd-card-0 snd-usb-audio alias sound-slot-0 snd-usb-audio in debian based it might be in /etc/modprobe.d/alsa-base options snd-usb-audio index=0 options snd-hda-intel index=1 |
Sep
Thu
3rd
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 hkp://subkeys.pgp.net # encrypt a file gpg --encrypt --recipient 'tnagy1024@gmail.com' foo.txt # decrypt a file gpg --output foo.txt --decrypt foo.txt.gpg |
Aug
Mon
31st
Nice trick: number base conversion one liners using bc
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 ‘obase=16; ibase=2; 11010101’ | bc D5 Note that “obase” must preced “ibase” in order to make a correct final result. Mulyadi Santosa |
Memory Jog: bash control characters and special variables
|
Aug
Sun
30th
RSI prevention: pgreplook up (pgrep) or signal (pkill) processes based on name and other attributes pgrep [-flvx] [-d delimiter] [-n|-o] [-P ppid,…] [-g pgrp,…]
-u by user -f full command -n /-o newest/oldest -x exact |
Aug
Sat
29th
1 line download source for slackbuildSlackbuilds 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 you can resolve with a variable (OUTPUT to join ARCH which is also not set but much necessary) 2. The download / unzip can be done via rsync - as shared on the linuxquestions board:
So we are left with the get source, check notes, run script part - so I’ve been dusting my shell scripts to create a script which can take a list of names, find their directories, get the source (needs to be something in there for the sourceforge HTML redirect pages), and create a script that can be run to run all the slackbuilds in a row (dont believe in totally automating this part just yet) First, write a one liner to get the url of the source file and run wget to get it
next i need a version which checks both for the 64bit and gets that instead (that should all be doable within the awk bit, if the DOWNLOAD_64= match contains something, use that, else use the DOWNLOAD=) after that i can take a list of names and crawl the build tree to download all the files (such a boring thing to do manually) Of course I suspect it would have taken me half the time to just do it in perl, and it would be easier in perl to generate a summary of any instructions plus a shell script to run the build. Or i can continue to dust my shell and do a whole script. tomorrow.
|
Aug
Thu
27th
memory jog: VimCopy & Select Text aka Yank
*NOTE: “+” represents shift.
Delete aka Cut:
Change & Replace
Undo:
Search & Search and Replace aka “Find and Replace”
Execute External Commands from within Vim
|
Aug
Wed
26th
memory jog: command line wireless toolsbasic configuration iwconfig wlan0 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 config files on slackware: same as wired in /etc/rc.d/rc.inet1.conf on freebsd, ifconfig string parameters in /etc/rc.conf on slitaz on ubuntu |
Aug
Tue
25th
ways to set the keyboard (in my case to swiss french layout)console:
for x: setxkbmap ch -variant fr |
→ |