This file contains hidden or 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
$(function() { | |
$("input[type=button][value=Add]").click(function(e) { | |
for (i = 0; i < document.getElementById('sel').value; i++) { | |
e.preventDefault(); | |
var j = 1; | |
var newDiv = $("<div>").appendTo("#dropbox"); | |
$("<select>").attr("name", "input1_"+j).appendTo(newDiv).append( | |
$("<option>").val("0").text("Option 1"), $("<option>").val("1").text("Option 2")); | |
$("<select>").attr("name", "input2_"+j).appendTo(newDiv).append( | |
$("<option>").val("0").text("Option 1"), $("<option>").val("1").text("Option 2")); |
This file contains hidden or 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
MYDIR="/home/${USER}/archives" | |
ls ${MYDIR}/*.tar > filelist | |
for FILENAME in `cat filelist` | |
do | |
ARCHDIR=${MYDIR}/$(basename $FILENAME .tar) | |
mkdir $ARCHDIR | |
echo ==== Extracting $FILENAME to $ARCHDIR: | |
tar -xf $FILENAME -C $MYDIR | |
done |
This file contains hidden or 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/tclsh | |
set svcPort 8001 | |
proc doService {sock msg} { | |
puts $sock "$msg" | |
} | |
proc svcHandler {sock} { | |
set l [gets $sock] |
This file contains hidden or 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/tclsh | |
proc read_sock {sock} { | |
set l [gets $sock] | |
puts stdout "ServerReply:$l" | |
} | |
proc read_stdin {wsock} { | |
global eventLoop | |
set l [gets stdin] |
This file contains hidden or 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
# .bashrc | |
# Remember to: | |
# cd ~ | |
# wget https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh -O .git-prompt.sh | |
# wget https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -O .git-completion.sh | |
alias rm='rm -i' | |
alias cp='cp -i' |
This file contains hidden or 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 | |
# Expects /path/to/dir_name | |
find ${1} -ls -mtime +30 -maxdepth 1 |
This file contains hidden or 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 | |
# Expects /path/to/dir_name | |
df ${1} |
This file contains hidden or 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 | |
# Expects /path/to/dir_name | |
du -sh ${1}/* |
This file contains hidden or 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 | |
# Expects /path/to/dir_name | |
du -sh ${1} |
This file contains hidden or 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 | |
cat /etc/*release |