This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SDCARD="$1" | |
RANDFILE="/tmp/rand10m" | |
TMPBIN="/tmp/tmp.bin" | |
MAGICWORD="--i-know-what-i-am-doing" | |
BS="10240" | |
COUNT="1024" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# --------------------------------------------------------------------- # | |
# dmesg-datestamp - Show dmesg in time/date stamp like in system # | |
# log. Since my brain can't interpret uptime # | |
# that well. # | |
# # | |
# version 0.1 - cj (2013-03-25) init. # | |
# --------------------------------------------------------------------- # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ********************************************************************* # | |
# pkgupdate : script for calling from crontab to update debian # | |
# packages on a machine using apt-get # | |
# Mainly this is a two commands # | |
# # | |
# apt-get update && apt-get upgrade -y -d upgrade # | |
# # | |
# but made readable report from the output of those # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# --------------------------------------------------------------------- # | |
# pkgupgrade - Upgrade debian package on the system. # | |
# # | |
# version 0.1 - cj (200x-xx-xx) init. # | |
# version 0.2 - cj (2013-07-17) comment, and start/finished time # | |
# added. # | |
# --------------------------------------------------------------------- # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# --------------------------------------------------------------------- # | |
# pkgorphremove : Remove Orphaned Packages. # | |
# Loop repeate removing/purging orphan packages # | |
# # | |
# version 0.1 : 2004-08-08 (cj) initial. # | |
# --------------------------------------------------------------------- # | |
while [ "`deborphan`" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ----- work space config ----- | |
WORKDIR="$(pwd)" | |
SRCDIR="${WORKDIR}/src" | |
BUILDDIR="${WORKDIR}/build" | |
LOGDIR="${WORKDIR}/log" | |
# ----- package config ----- | |
NAME="python" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LEN=10 # video length in seconds | |
SLEEP=3 # sleep time in seconds | |
SAVEDIR="/tmp/camera" | |
CAMERA=$1 | |
# How to use thi script | |
[ -z "$CAMERA" ] && echo "Usage: $0 /dev/videoX ## where X is [0..n]" && exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BASEDIR="/srv/repos/apt/debian" | |
CONFDIR="${BASEDIR}/conf" | |
DISTFILE="${CONFDIR}/distributions" | |
OPTIONS="${CONFDIR}/options" | |
DEBWORKDIR="/home/cj/work" | |
# DEBFILE="${DEBWORKDIR}/python_3.10.4-1_amd64.deb" | |
DEBFILE="python_3.10.4-1_amd64.deb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
REPODIR="/srv/repos/apt/debian" | |
CONF="/tmp/repos-$$.conf" | |
APACHECONFDIR="/etc/apache2/conf-available" | |
[ ! -d "${APACHECONFDIR}" ] && \ | |
echo "Apache2 conf directory is not available, is it installed?" && \ | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
NAME="Chatchai Jantaraprim" | |
EMAIL="cj@cjv6.net" | |
[ -d ".gnupg" ] && echo "Directory .gnupg exist" && exit | |
# rm -rf .gnupg | |
mkdir -m 0700 .gnupg | |
touch .gnupg/gpg.conf |
NewerOlder