News:

The Latest electronic and computer Tips that work!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - branx86

#196
General Discussion / Embed Image into Webpage (Webcam)
December 11, 2015, 02:59:37 PM
Open notepad and insert html below with ipaddress and port don't forget to save as html.

<img src="http://ip address:port/?action=stream" height="300" width="340" />

                               OR

<!-- Add this line to your website's landing page to include video-->
<iframe src="http://<PI-IP>:8081" height="750" width="1300"></iframe>
#197
Raspberry Pi / Raspberry PI IP Camera Parts List
December 11, 2015, 12:40:14 PM
Turn key IP Camera
150Mbps Mini USB WiFi Wireless Adapter Network LAN Card 802.11n/g/b PC Receiver  $1.89
Mini USB 5M Retractable Clip WebCam Web Camera Laptop DT Net weight: 35g Item size: 40*29*28mm  $2.30
USB male to USB micro male cable $1.00
Self protrait Stick with bendable mount $1.00
8MB Micro SD card $1.67
Raspberry Pi B+ Development Board  $19.99

Total Cost $27.85


DIY IP Camera
150Mbps Mini USB WiFi Wireless Adapter Network LAN Card 802.11n/g/b PC Receiver  $1.89
Mini USB 5M Retractable Clip WebCam Web Camera Laptop DT Net weight: 35g Item size: 40*29*28mm  $2.30
USB male to USB micro male cable $1.00
Self protrait Stick with bendable mount $1.00
8MB Micro SD card $1.67
Raspberry Pi Zero Development Board  $5.00

Total Cost $12.86
#198
Solar Power / Cheap Battery FOr Solar
December 07, 2015, 04:33:46 PM
Everstart 27DC with 115amp hour @ $82.00 Best bang for the buck for inexpensive solar setup.

This battery is good if you keep it topped off with distilled water and keep it charged.
#199
Linux Fixes / Send Mail via Google
December 04, 2015, 04:18:28 PM
SMTP  = ssl://smtp.gmail.com:465port
      copy the smtp address in your address spot put the port number in your port spot and put in your gmail credentials and everything should work.
#200


One (at minimum) USB external hard drive for simple network backups and file serving



Once you have gathered up the hardware, followed along with the Getting Started with Raspberry Pi tutorial to get up to speed (and are running Raspian) it's time to start setting up your Pi as a NAS.
Once you're at the command line the first thing you need to do is to add in support to Rasbian for NTFS-formatted disks. To do so type the following command: sudo apt-get install ntfs-3g 

Then do: sudo fdisk -l


The first disk /dev/mmcb1k0 is the SD card inside the Raspberry Pi that houses our installation of Raspbian. We're going to leave that one completely alone.
The second disk, /dev/sda is our first 1TB external hard drive. Make a note of the hard drive names.

Before we can mount the drives, we need to create a directory to mount the drives to. For the sake of simplicity we're going to simply make directory called USBHDD1 and USBHDD2 for each drive. First we have to make the drives. At the command line enter the following commands:  sudo mkdir /media/USBHDD1
After you've created the directory, it's time to mount the external drive to each location.
sudo mount -t auto /dev/sda1 /media/USBHDD1

Time to install Samba so we can access the storage from elsewhere on the network. At the command line enter: sudo apt-get install samba samba-common-bin

Make a backup copy of the Samba configuration file in case we need to revert to it. At the command line, type the following command line: sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old

Do some basic editing in the Samba config file. Type the following at the command line:  sudo nano /etc/samba/smb.conf
You should see something like the following in your terminal window:


The workgroup identifier, by default workgroup = WORKGROUP. If you're using a different name for your home workgroup.
Turn on user authentication for our samba storage, otherwise anyone with general access to our network (like guest Wi-Fi users) will be able to walk right in. Scroll down in the Samba config file until you get to the section that reads:


Remove the # symbol from the security = user line (by highlighting it with the cursor and pressing delete) to enable username/password verification for the Samba shares.

add an entirely new section to the configuration file. Scroll all the way down to the very bottom of the file and enter the following text:
[Backup]
comment = Backup Folder
path = /media/USBHDD1/shares
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no


Note: Whatever you put in the brackets in the top line is going to be the name of the folder as it appears on the network share. If you want another name other than "Backup" now is the time to edit it.

Press CTRL+X to exit, press Y when asked if you want to keep changes and overwrite the existing configuration file.
Then do: sudo /etc/init.d/samba restart

Add in a user that can access the Pi's samba shares.  You can make your username and password whatever you wish. To do so type the following commands:
sudo useradd backups -m -G users
sudo passwd backups



To make a legitimate Samba user. Enter the following command:  sudo smbpasswd -a backups
Now go to your windows computer and put in the Raspberry Pi address:

When prompted, enter the credentials you created in the previous steps.

Configure our Pi so that when it restarts it will automatically mount the external hard drives. To do so we need to fire up the nano editor and make a quick edit. At the command line type:  sudo nano /etc/fstab

Add a few quick entries. Within the nano editor add the following lines:   /dev/sda1 /media/USBHDD1 auto noatime 0 0

So far our Raspberry Pi NAS is hooked up to the network.
sudo apt-get install rsync

Once rsync is installed, it's time to set up a cron job to automate the process of copying files from the USBHDD1
At the command line enter the following command:  crontab -e

The command will open up your cron scheduling table in the nano text editor which should be rather familiar to you at this point in the tutorial.  Go ahead and scroll down to the bottom of the document and enter the following line:   

0 5 * * * rsync -av --delete /media/USBHDD1/shares /media/OtherHDD/shares/


This command specifies that every day at 5:00AM (the 0 5 part), every single day (* * *, wild cards in the year, month, day spots), we want rsync to compare the two directories, copying everything from HDD1 to HDD2 and deleting anything in the backup directory that no longer matches something in the primary directory—i.e. if we have a movie file on HDD1 we delete, we also want that file to be removed from the backup on the next synchronization.

If you wish to run the rsync immediately to get the data mirrored faster and make the initial cron job a little lighter on the system, go ahead and enter the same rsync command you put into the crontab at the command line like so:   rsync -av --delete /media/USBHDD1/shares /media/OtherHDD/shares/

That's it!

#201
Windows Fixes / Convert VHDX to VHD
December 03, 2015, 10:46:21 AM
 VHD - Is Limited to 2TB.
VHDX - Is to allow the image to break to 2TB limit.

VBoxManage.exe clonehd "PATH_TO_YOUR_FILE.VHDX" --format VHD "PATH_TO_CONVERTED_FILE.vhd"

VBoxManage.exe is part of Oracles VirtualBox.
#202
http://www.stevejenkins.com/blog/2010/08/renewing-a-self-signed-ssl-certificate-on-fedoracentos/


Verify the filenames, locations, and the directives of your web server's SSL configuration by doing:  grep SSLCertificate /etc/httpd/conf.d/ssl.conf

You should get something like:
# Point SSLCertificateFile at a PEM encoded certificate. If
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
# Point SSLCertificateChainFile at a file containing the
# the referenced file can be the same as SSLCertificateFile
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt

you can change how long you want the certificate by by changing  -days 1460      365= 1year   1460= 4 years
Type the following as root:  openssl req -new -days 365 -x509 -nodes -newkey rsa:2048 -out /etc/pki/tls/certs/localhost.crt -keyout /etc/pki/tls/private/localhost.key


Answer the questions as they are presented to create your new certificate files.

Type service httpd restart to restart your web server and tell it to use the new certificate files.

You're done!
#203
Linux Fixes / Show Repo list and enable and Disable
November 18, 2015, 12:16:01 PM
yum repolist all


yum-config-manager --enable  <RepoName>

yum-config-manager --disable  <RepoName>
#204
Linux Fixes / The Version of Linux your using
November 09, 2015, 03:49:44 PM
Do uname-a   or   cat /etc/*-release
#205
Windows Fixes / Reset Password Win 7 & 8
November 04, 2015, 03:08:13 PM
Boot into Recovery mode:  F11 while booting or Boot CD/USB

The following screens appear one after another, after following your vendor's method of entering into recovery mode.


Choose your keyboard layout.





Choose !!!!!****Troubleshooting!!!!***** option




Choose Advance option..



Choose Command Prompt option.

rename utilman.exe utilman2.exe
rename cmd.exe utilman.exe


Now restart your computer, at the logon screen, click on bottom left icon and command prompt will open. Now use the net user trick



Open CMD (command prompt) with administrative rights to type this command.

net user <user-name> <Password>

Reboot, after getting into Windows 8, please remember to rename the Utilman.exe.bak back to Utilman.exe.

That's it – you have successfully reset your forgotten Windows 8 password.

#206
General Discussion / Laser Transmiter & Receiver
October 22, 2015, 01:57:08 PM
Laser transmitter

Cheap laser pointer
Batteries
Transformer radio shack 273-1380
Solar cell radio shack 274-124 or a photo resistor
Wire



connect the 1,000 ohm side of the transformer between the battery and the laser. The 1,000 ohm side of the transformer has three wires coming from it. We only use the outside two wires. The inside wire is called a center tap and we do not use it in this circuit. Test the laser by attaching the battery. The laser should operate normally at this point.



The receiver is the simplest part. You simply connect the solar cell to the microphone jack, and plug it into the amplifier or stereo phono input. It does not matter which way the wires are connected to the solar cell. Here is the schematic of the receiver:




All Together and working.


#207
General Discussion / Dell Monitor E228WFPc Repair
October 22, 2015, 01:29:35 PM
Does your monitor come on then turn off?  The fix is R821 and C808.
Dell monitor
E228WFPc
R821= 1mega ohm 1/2watt.   Qty2
C808= 2.2uf@16v
#208
Linux Fixes / Reset a Forgotten Root Password
October 22, 2015, 01:19:10 PM
Tips & Tutorials - for Linux users & RHEL/CentOS SysAdmins
April 20, 2014
How to Reset a Forgotten Root Password
In case you forgot the root password on a Linux system, you can reset the unknown current password and change it to a new one, by booting the system into "Single User" mode.

In Single User mode (which is equivalent to "Runlevel 1") - the regular boot process is interrupted, and you quickly reach a root prompt from which changes can be made.

Booting into "Single User" mode ("Runlevel 1")

1. When the system's boot process begins (after power-on/restart) -
Press any key to interrupt the GRUB bootloader countdown.

2. If a password was configured to protect access to GRUB - press "p" to enter the password.
If no password was configured - skip this step.

3. Press "e" to edit.

4. Use the Arrow Keys to move to the kernel line.

5. Press "e" to edit the kernel line.

6. At the end of the line (which might read, for example: "rhgb quiet"), add: "<space> single".

(Btw, "<space> 1" will work as well).

7. Press "b" to save & boot with changes.

8. After a root prompt is obtained: enter the passwd command, and change the root password to a new desired one.

9. Type exit to continue the boot, and wait for the system to load as usual.
#209
General Discussion / Convert Media Using VLC
October 20, 2015, 09:38:49 AM
Step 1: Launch VLC media player and click on Media –> Convert / Save.


Step 2: Under the file tab you will see two sections. In the first one add the file you want to convert while the second section can be used to embed a subtitle to the converted video that's already in sync.


Step 3: Click on the Convert/Save button when you are done. Finally select the destination folder, give a desired filename, select the desired video profile and click on the start button.



Note: By default VLC media player comes packed with a few profiles that can convert your video to most of the widely used audio and video formats. You can edit, delete or create new profiles using three buttons located next to the select profile dropdown list.


You can play with various settings like audio and video codecs to get your desired conversion profile.

Step 5: Once everything is at place press the start button.
#210
General Discussion / Record a stream to file using VLC
October 20, 2015, 09:23:26 AM

You need the stream Location URL!!!!
Right-click on the video and from the Properties dialog copy the URL you can find at "Location".



    open VLC and go to Media → Open Network Stream... The Open Media dialog will open, paste the URL you've just copied in the URL box.


    Unfold the "Play" button and click on the Convert option. You can also do this by pressing Alt+C in your keyboard.


    In the Convert dialog you will have to select the location and type of the destination file. Click the Browse button and in the explorer like window you can browse your folders and give a name and extension to the output file.




    Click OK and you are back to the Convert dialog, here you will be able to select if you want to view the output while recording and the profile. For this example I selected the default Video – H.264 + AAC (MP4) but you can choose the one that best fits your needs.


    Click start and after a few seconds of buffering the live feed video will start being recorded.



    To end the recording just click the Stop button and to play the output file all you have to do is go to the containing folder and double click on it. Depending on the file type you selected and your system configuration it will be played on different players.
    Final Words

    Now you can start recording all those live feeds you've always wanted to save for later viewing or to share with your friends and family. VLC media player makes it easy and simple for you.