Skip to content

Instantly share code, notes, and snippets.

@Gen2ly
Gen2ly / gist:5242082
Last active January 28, 2024 15:11
Doom3 configuration (autoexec.cfg)
// Graphic Card
seta sys_videoRam "512" // use com_videoRam to check if right
// Sound Card
seta s_alsa_pcm "plughw:1,0" // Use second sound out device
// Monitor
@Gen2ly
Gen2ly / pspvidconv
Created July 16, 2012 17:36
Convert videos to PSP
#!/bin/bash
# Convert videos to PSP
# Settings
vid_dir=/run/media/$USER/PSP/VIDEO # For Gnome 3, Gnome 2: /media/PSP/VIDEO
vid_vcd="-vcodec mpeg4 -vtag xvid" # Video codec: xvid
vid_vcd="-vcodec libx264" # Video codec: x264
vid_vcd="-vcodec h264"
vid_res=320x240 # 320x240 for PSP 1001, 480x272 for 2001
vid_vbr=768k # Video bit rate, was 1024
@Gen2ly
Gen2ly / ghsync-gist
Created June 7, 2012 11:56
Create a github gist repository for sharing scripts/configs on blog
#!/bin/bash
# Create a github gist repository for sharing scripts/configs on blog
# Base directory, repository parent directory
base_dir=""$HOME"/"
repo_par=""$HOME"/.github-gist/"
# File list (File list order must match repository order)
files=('/home/todd/.scripts/others/ghsync-script'
'/home/todd/.scripts/vault/unity-effects'
@Gen2ly
Gen2ly / cmtstrip
Created June 1, 2012 15:36
Output file without comments or blanklines
#!/bin/bash
# Output file without comments or blanklines
# Display usage if no parameters given
if [ -z $1 ]; then
echo " ${0##*/} <*c> <filename> - print file w/o comments/blanklines - (c)lipboard"
exit 1
fi
case $1 in
@Gen2ly
Gen2ly / md2wp
Created July 9, 2012 23:34
Convert Markdown to Wordpress blogging format
#!/bin/bash
# Convert Markdown to Wordpress blogging format
# Required program(s)
req_progs=(ascii2uni pandoc)
for p in ${req_progs[@]}; do
hash "$p" 2>&- || \
{ echo >&2 " Required program \"$p\" not installed."; exit 1; }
done
@Gen2ly
Gen2ly / cb-in
Created June 7, 2012 10:59
Copy file or pipe to Xorg clipboard
#!/bin/bash
# Copy file or pipe to Xorg clipboard
# Required program(s)
req_progs=(xclip)
for p in ${req_progs[@]}; do
hash "$p" 2>&- || \
{ echo >&2 " Required program \"$p\" not installed."; exit 1; }
done
@Gen2ly
Gen2ly / mp
Created June 22, 2012 20:07
Common makepkg building tasks
#!/bin/bash
# Common makepkg building tasks
mntr_info="Gen2ly <toddrpartridge@gmail.com>"
usage () {
echo " ${0##*/} <option> - common makepkg building tasks
b - build package (install dependencies if required)
m - update md5sums
r - remove previous build directories
@Gen2ly
Gen2ly / cb-out
Created June 7, 2012 10:59
Paste contents of Xorg clipboard to a file from the command line
#!/bin/bash
# Paste contents of Xorg clipboard to a file from the command line
filename=$@
pasteinfo="clipboard contents"
# Display usage if no parameters given
if [[ -z "$@" ]]; then
echo " ${0##*/} <filename> - paste contents of context-menu clipboard to file"
exit
@Gen2ly
Gen2ly / externalmonitor
Created May 31, 2012 17:21
Toggle between laptop and external monitor
#!/bin/bash
# Toggle between laptop and external monitor
# Required program(s)
req_progs=(bc)
for p in ${req_progs[@]}; do
hash "$p" 2>&- || \
{ echo >&2 " Required program \"$p\" not installed."; exit 1; }
done
@Gen2ly
Gen2ly / vim2html
Created May 31, 2012 17:10
Create HTML code from Vim syntax highlighting (for use in coloring scripts)
#!/bin/bash
# Create HTML-colored code from Vim syntax highlighting
filename=$@
background=light
colorscheme=beauty256
#colorscheme=simple256
#colorscheme=peaksea
# Display usage if no parameters given