Skip to content

bsandrow/utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Utils

These are a scripts/utilities written by others that don't necessarily have a code base/repository/homepage for them.

jpegrescan

A perl script that uses jpeg tools to optimize jpeg compression by micro-managing some of the compression math based on research into some of the most common parameters. Ganked from a URL to pastebin.com posted to Hacker News. http://pastebin.com/f78dbc4bc

dtree

A little shell script that prints out an ASCII art respresentation of the directory tree. Gleaned this from here: http://www.linuxjournal.com/article/150

ansicolortable

Displays a formatted ANSI color table with the bash/shell escape sequences. Source: http://uwstopia.nl/files/2006/07/ansicolortable

mlarc2mbox

Converts an mlarc .txt file into an mbox file. Source: http://lists2.ssc.com/pipermail/linux-list/2006-February/026220.html

pause-pulseaudio

Suspends PulseAudio (and anything using it to play). This allows programs that need to directly access ALSA but aren't playing well with PulseAudio a chance to work. Source: http://ubuntuforums.org/showthread.php?t=790889

grabssh

Meant to be executed on the remote end of an ssh connection. Creates a script that can be sourced by bash to update ssh connection variables. This is useful if you have a screen session that was started under a different ssh connection, and you want to repair ssh-agent-fowarding (which breaks if you attach from a different ssh connection).

Once you create a new ssh connection to the remote host, this script needs to be run on the remote host. After the fixssh script is created, you can attach the screen session, and run source /path/to/fixssh from any terminal under the screen session that needs ssh-agent access.

Some relevant aliases to use on the remote host are:

alias Attach='grabssh ; screen -d -R'
alias fixssh='source $HOME/tmp/fixssh'
alias ssh='fixssh ; ssh'

An Emacs function to assist:

(defun fixssh ()
  "Run fixssh script for use in GNU screen with X forwarding"
  (interactive)
  (save-excursion
    (let ((buffer (find-file-noselect "~/bin/fixssh")))
      (set-buffer buffer)
      (setq buffer-read-only t)
      (goto-char (point-min))
      (while (re-search-forward
              "\\([A-Z_][A-Z0-9_]*\\) *= *\"\\([^\"]*\\)\"" nil t)
        (let ((key (match-string 1))
              (val (match-string 2)))
          (setenv key val)))
      (kill-buffer buffer))))

Source:

About

small utility scripts that others have created (most don't have a 'proper' webpage)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published