Check These Out
Write a file you edited in Vim but that you do not have the permissions to write to (unless you use sudo.) Same as #1204 but without the echo to stdout that I find annoying.
Slug the part of an URL which identifies a page using human-readable keywords. Slugs are used to construct friendly URLs (often for permalinks) that are easy to type, descriptive, and easy to remember.
In this example, where the users gpg keyring has a password, the user will be interactively prompted for the keyring password.
If the keyring has no password, same as above, sans the prompt. Suitable for cron jobs.
~/.gnupg/passwd/http-auth.gpg is the encrypted http auth password, for this particular wget use case.
This approach has many use cases.
example bash functions:
function http_auth_pass() { gpg2 --decrypt ~/.gnupg/passwd/http-auth.gpg 2>/dev/null; }
function decrypt_pass() { gpg2 --decrypt ~/.gnupg/passwd/"$1" 2>/dev/null; }
That is, after running `vagrant ssh-config` to determine ports and ip's:
$ vagrant ssh-config
Host default
HostName 127.0.0.1
User vagrant
Port 2200
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/romanvg/tmp/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL
This will save and execute your python script every time your press the F5 function key.
It can also be added to your .vimrc:
autocmd BufRead *.py nmap :w^M:!python %
NOTE: the ^M is not just caret-M, it can be created by type: ctrl-v ctrl-m
Converts a single FLAC file with associated cue file into multiple FLAC files.
Takes two arguments: the name of the FLAC file and and the name of the cue file.
Example: flacAlbumToFiles foo.flac foo.cue
Requires:
- cuetools
- shntools
Errors in output don't matter. Stop recording: ctrl-c. Result playable with Flash too.
IMPORTANT: Find a Pulse Audio device to capture from: pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d" " -f2