Are you a spammer

Please note, that the first 3 posts you make, will need to be approved by a forum Administrator or Moderator before they are publicly viewable.
Each application to join this forum is checked at the Stop Forum Spam website. If the email or IP address appears there when checked, you will not be allowed to join this forum.
If you get past this check and post spam on this forum, your posts will be immediately deleted and your account inactivated.You will then be banned and your IP will be submitted to your ISP, notifying them of your spamming. So your spam links will only be seen for an hour or two at most. In other words, don't waste your time and ours.

This forum is for the use and enjoyment of the members and visitors looking to learn about and share information regarding the topics listed. It is not a free-for-all advertising venue. Your time would be better spent pursuing legitimate avenues of promoting your websites.

New toyz

Source code I have written openly published for your viewing pleasure.


New toyz

Postby TheeMahn » Sat Aug 11, 2012 6:52 pm

I recently purchased a second monitor to aid in programming. I can launch software on the left monitor and watch it run on the second; increased productivity. Both monitors are technically the same HannsG 28" monitors. Revision however are different the new monitor has features the old one does not as well as a higher refresh rate. I am running as time of post non existant Ultimate Edition 3.5 to the public.

The reason I have taken the time to generate / write software in this department 12.04 is piss poor in a multi-monitor department. Lets get down to the brass tacks on this maybe they can learn a few things here all software is work in progress, please be easy:
Code: Select all
#!/bin/bash
# Multi-Monitor - Multiple monitor detection xinerama script
# Script via TheeMahn <[email protected]>
#
# This script will detect ports and monitors enabling only monitors
# that are conected and set xinerama view.

# Version Control
MULTIMONITOR="1.7.0-3"

# set colors so errors etc. stand out.

txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m'   # Black - Background
bakred='\e[41m'   # Red
badgrn='\e[42m'   # Green
bakylw='\e[43m'   # Yellow
bakblu='\e[44m'   # Blue
bakpur='\e[45m'   # Purple
bakcyn='\e[46m'   # Cyan
bakwht='\e[47m'   # White
txtrst='\e[0m'    # Text Reset

# provide info to user
function Scan {
echo -e "${bldwht}TheeMahn's Multi-monitor script. Please report bugs to TheeMahn <[email protected]>${txtrst}"
MONITORS=`xrandr | grep ' connected' -c`
PORTS=`xrandr | grep 'connected' -c`
echo "$PORTS Ports detected and $MONITORS Monitors detected. Enabling $MONITORS monitors(s) and setting default resoultion(s)."
echo "Port(s) connected: "
xrandr | grep ' connected' | cut -d' ' -f1
echo "Default resolution(s):"
xrandr | grep '*+' | grep 'x'
# begin detection & generate command to be executed.
OUTPUTS=`xrandr | grep ' connected' | cut -d' ' -f1`
PRIMARY=`xrandr | grep -m 1 ' connected' | cut -d' ' -f1`
EXECUTE=""

for CURRENT in $OUTPUTS
do
                        EXECUTE+="--output $CURRENT --auto "
done
EXECUTE+="--right-of $PRIMARY"
echo "Command to be executed: xrandr $EXECUTE"
echo "If you can read this we were successful. If you would like to make changes permenent please cron this script:"
# the below command will be implemented after feedback of bugs if any.
xrandr $EXECUTE
echo 'sudo echo "*/1 * * * *     '$USER'     DISPLAY=:0.0 '$0' > ~/mm.log 2>&1 >> /etc/crontab"'
}

function Help {
   echo -e "${bldwht}

multi-monitor $MULTIMONITOR
=============

Usage: multi-monitor -<-COMMAND> [option]

   possible commands...      

   -v   --version      dump version info
   -s   --scan         Scans for NAS drive on network.
   -h   --help         this help message

   Usage Scan;
   multi-monitor -s

   Detect ports and monitors enabling only monitors
   that are conected and set xinerama view.

   After completion and successfully finding the NAS will optionaly add the
   command crontab to set for bootup.

   Useage Help;
   multi-monitor -h

   Displays this message. For futher information please refer to the manpages. 

   man multi-monitor
   "
   echo -e "${txtgrn}"
echo "
GNU multi-monitor home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word multi-monitor somewhere in the Subject: field."
   exit 0
}

function Version {
echo "multi-monitor $VERSION
==============
GNU multi-monitor home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word multi-monitor somewhere in the Subject: field."
}

    case "$1" in
      -h|--help|-\?) Help; exit 0;;
      -v|--version) Version; exit 0;;
      -s|--scan) Scan $1 $2 $3; exit 0;;
      *) Help; exit 0;;
    esac


It get's much better, I have been developing an entire O/S to drop on a nas. Well now I have to be able to access the nas in order to write software for it... It has began:
Code: Select all
#!/bin/bash
#Mount NAS written via TheeMahn <[email protected]>
#written explicitly for the Seagate GoFlex line of NAS. I am working through command switches to allow providing
# 0 information from the enduser with the same result
PASSWORD='YOURPASS'      # Your Password to mount the NAS
MOUNTPOINT='/media/NAS'   # Example: /media/NAS_3TB
NASIP='192.168.0.105'      # Example: 192.168.0.105

#You should not have to change any of the below.

NASUPVERSION="1.7.0-3"
# set colors so errors etc. stand out.

txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m'   # Black - Background
bakred='\e[41m'   # Red
badgrn='\e[42m'   # Green
bakylw='\e[43m'   # Yellow
bakblu='\e[44m'   # Blue
bakpur='\e[45m'   # Purple
bakcyn='\e[46m'   # Cyan
bakwht='\e[47m'   # White
txtrst='\e[0m'    # Text Reset

#Check for existance of mountpoint, if not create one, set permissions
#and ownership.
function Scan {
if [[ $2 == "" ]]; then
   echo -e "${bldred}Command format is nasup <PASSWORD> [IP] [MOUNTPOINT]"
   echo -e "${bldwht}Example:${bldgrn} nasup mypass 192.168.0.105 /media/NAS${txtrst}"
   echo "You must minimally provide the NAS password."
exit 0
fi
# set defaults if user did not specify a mountpoint.
if [[ $3 == "" ]]; then
   MOUNTPOINT='/media/NAS/'
fi
# create mountpoint & set permissions if it does not exist.
if [ ! -d $MOUNTPOINT ]; then
   echo "Mount point does not exist, creating $MOUNTPOINT."
   sudo mkdir -p $MOUNTPOINT
   sudo chown $USER:$USER $MOUNTPOINT
   sudo chmod 777 -R $MOUNTPOINT
else
echo $MOUNTPOINT " exists. Pinging $NASIP."
fi

#Ping NAS Host IP address check for existance if not exit graciously.
TPING=`ping -c 1 $NASIP | grep '0 received'`
if [[ $TPING = '' ]]; then
echo "Host exists, attempting mount."
echo "Mounting NAS from $NASIP to $MOUNTPOINT."
sudo mount -t cifs '//'$NASIP'/GoFlex Home Personal' $MOUNTPOINT -o username=$USER,password=$PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
else
echo 'No route to host. Please check the IP and try again.'
exit 0
fi
}
function Help {
   echo -e "${bldwht}

nasup $NASUPVERSION
=============

Usage: nasup -<-COMMAND> [option]

   possible commands...      

   -v   --version      dump version info
   -s   --scan         Scans for NAS drive on network.
   -h   --help         this help message

   Usage Scan;
   nasup -s <NAS PASSWORD> [IP] [MOUNTPOINT]

   Scans LAN for NAS drive on network. IP is optional, so is the
   mountpoint. Not specifying a mountpoint will create one at
   /media/NAS/. Not specifing an IP will scan the entire network for the NAS.
   This feature makes finding the NAS much slower. Specifing an IP
   is much faster.

   After completion and successfully finding the NAS will optionaly add the
   drive to the fstab for mounting on bootup.

   Useage Help;
   nasup -h

   Displays this message. For futher information please refer to the manpages. 

   man nasup
   "
   echo -e "${txtgrn}"
echo "
GNU nasup home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word nasup somewhere in the Subject: field."
   exit 0
}

function Version {
echo "nasup $VERSION
==============
GNU nasup home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word nasup somewhere in the Subject: field."
}

    case "$1" in
      -h|--help|-\?) Help; exit 0;;
      -v|--version) Version; exit 0;;
      -V|--verbose) Build $1 $2; exit 0;;
      -s|--scan) Scan $1 $2 $3; exit 0;;
      *) Help; exit 0;;
    esac


Ultimate Edition 3.5 I have on the net, however is crap in comparison we are here for KDE right? Gnome is default on the one on the net that admin have access to. I am probably looking at 2 or 3 builds before a release worthy event happens. Will this software enter the mix? Probably not, it is very shaky at this point. Will it in the future? Very little doubt, it will be a part of the tm-toolz package. You ladies and gents have seen the tip of the iceburg as what this package will provide. Repomaster will be a part of the same package, i could go on in that deparment. One thing I am not looking forward to is writing the documentation.
docs.png
Repomaster auto-generated man nassup ;)
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: Dual 4K 43" LG, 4K Samsung 28"
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4201
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 53
Operating System: Ultimate Edition Developer

Return to Programming

Who is online

Users browsing this forum: No registered users and 12 guests