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

Topics - branx86

#141
Raspberry Pi / Take a Picture
December 08, 2016, 03:21:38 PM
Take a picture
Install the software:
sudo apt-get install fswebcam
Capture images:
fswebcam -r 640x480 image.jpg


ls  /dev/v4l/by-id/    will list all USB cams
lsusb   will give the address of cams

sudo modprobe bcm2835-v4l2   -If you see a grey picture from camera or no picture at all
#142
Raspberry Pi / Shoot Video and playback with USB Cam
December 08, 2016, 03:18:53 PM
Shoot video:
sudo apt-get update
sudo apt-get install ffmpeg
  ffmpeg avconv -f video4linux2 -r 7 -s 640x480 -i /dev/video0 video0.avi
ls  /dev/v4l/by-id/    will list all USB cams
v4l2-ctl --list-formats will show all formats cams will do
ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video0 -frames 1 out.jpg   - Takes a picture
ffmpeg -f v4l2 -framerate 30 -video_size 1280x720 -input_format mjpeg -i /dev/video0 -c copy out.mkv  - Make Video


play video:
sudo apt-get install omxplayer
omxplayer -o hdmi video0.avi



ls  /dev/v4l/by-id/    will list all USB cams
lsusb   will give the address of cams

sudo modprobe bcm2835-v4l2   -If you see a grey picture from camera or no picture at all
#143
Linux Fixes / Dump Database in a .sql file
November 18, 2016, 12:45:45 PM
To make a .sql file just go to the cmd line and type mysqldump Database > .sql File name.

    cmd        Database          .sql file
mysqldump test            >    dump.sql


example :   mysqldump --opt -u root -p'YourPasswordHere' gallery3 > ~/gallery3.sql
#144
If you have your old web.config, you need to take the line that says AsymmetricKey and move it over to replace the one in the new web.config. You can't recover the full key if you don't have the web.config.
#145
Linux Fixes / Mount folder from Linux to Linux
November 15, 2016, 03:20:15 PM

              Source Server     The Path        Destination Folder on the server
mount       192.168.1.250:/mnt/bigdisk /mnt/bigdrive

Problem:   If the message mount.nfs: access denied by server while mounting

Solution:  1st      showmount -e "the ip of the computer share"   check to see if the /mnt/drive is being shared.
                2nd     check that the usr is mapped and the correct group set
                3rd      if using a server mak sure the nfs server is running and the correct mount is being served.
#146
Linux Fixes / Change Chip HDMI Resolution
November 15, 2016, 11:55:36 AM
You can change the resolution via SSH using the following commands (login as 'chip' user, not as 'root'):

chip@chip:~$ export DISPLAY=:0
chip@chip:~$ xrandr --output HDMI-1 --mode 1280x720 --rate 60.00

You can see more of my observations here: https://bbs.nextthing.co/t/just-got-c-h-i-p-and-the-screen-keeps-going-black-on-and-off/11595/3?u=mikakoskiola
#147
Linux Fixes / Create Backup of MySQL Database
November 03, 2016, 03:51:49 PM
mysqldump database_name > /path/to/store/database_name.sql

mysqldump -u [username] –p[password] [database_name] > [dump_file.sql]
#148
Linux Fixes / Setup Linux Router with 2 Nics
November 03, 2016, 02:14:44 PM
Turn off selinux
/etc/sysconfig/selinux
Choose disabled

sestenforce 0

/etc/sysconfig/netwok-script/ifcfg-eth1
Make sure this IP is your Gateway 192.168.1.1

/etc/sysctl.conf
net.ipv4.ip_forward=1

sysctl -p  /etc/sysctl.conf enables change

Setup Nating
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

etc/sysconfig/network
FORWARD_IPV4=YES

etc/sysconfig/dhcpd
DHCPDARGS=eth1

etc/sysconfig/network
NETWORKING=yes
HOSTNAME=DHCP
GATEWAY=192.168.1.1


/etc/dhcpd/dhcpd.conf
Option domain-name "cbrandon.local";
Option domain-name-servers 192.168.1.1,8.8.8.8;
Default-lease-time 600;
Max-lease-time 7200;
Authoritative;
Log-facility local7;
#this is a very basic subnet
Subnet 192.168.1.0 netmask 255.255.255.0{
Range 192.168.1.1 192.168.1.250;
Option routers 192.168.1.1;
}

Service dhcpd start

route add -host 255.255.255.255 dev eth1
route delete default gw 192.168.1.1 eth1
route add default gw 192.168.1.1 eth0

chkconfig NetworkManager off
Service NetworkManager stop
Chkconfig network on
Service network restart

iptables -F      Deletes all rules
iptables -t nat -F
iptables -t mangle -F
iptables -X         Deletes all rules not default
iptables -t nat -X
iptables -t mangle -X


iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
#149
Windows Fixes / Lock workstation from cmd
November 02, 2016, 09:47:25 AM

rundll32.exe user32.dll, LockWorkStation
#150
Windows Fixes / Add program to Startup win10
November 02, 2016, 09:45:23 AM
Open the "Run" dialog box type shell:startup

shortcut is placed in the "Startup" directory.
#151
Linux Fixes / Iptables open ports
November 02, 2016, 09:44:21 AM
List Rules with Line Numbers
iptables -L --line-numbers

Deletes Rule with line Number
iptables -D INPUT 3

Add port accessible to wan
iptables -A INPUT -p tcp -m tcp --dport 8040 -j ACCEPT
#152
Linux Fixes / Dump sql data into Database
November 02, 2016, 09:42:48 AM
Dump sql data into database use cmd:
mysql -u <user name> -p<password> <database name> < sqlfilename.sql

dump data with no password on database
mysql db_name < backup-file.sql
#153
Raspberry Pi / Install kodi on pi 3
June 08, 2016, 08:25:50 PM
Install Kodi
1. Open Cmd and type Sudo apt-get update.
2. Sudo apt-get install kodi
3. Open system - file manager- add sources put http://fusion.tvaddons.ag
4. Open system - settings - install from zip choose fusion
5. Install start here and install all 3 zip files

6. If you want to start when the pi boots edit. /etc/default/kodi and change ENABLED to 1
#154
 default Windows 10 Pro key VK7JG-NPHTM-C97JM-9MPGT-3V66T

SCENARIO 3: UPGRADING A NEW PC FROM HOME TO PRO

Let's say you buy a new PC with Windows 10 Home installed by the OEM. When you check the Activation page in Settings, it should look something like this:


If you have a Windows 10 Pro product key, you can click the Change Product Key button and enter it here. Easy.

If you don't have a Pro product key and you want to buy one, you can click Go To Store and purchase the upgrade for $100. Also easy.

But what if you have a Windows 7 Professional or Ultimate key, or a Windows 8/8.1 Pro key? In that case, you need to do the upgrade in two steps.

First, make sure you've installed the November update and you are running version 1511.

Next, click Change Product Key and enter the default Windows 10 Pro key (see above). After the upgrade completes, check the Activation screen again and you'll see this:


What, you were expecting that default key to magically give you a $100 upgrade? Sorry, that's not how it works, despite what you might have read elsewhere.

Instead, click the Change Product Key button and enter your Windows 7 Pro/Ultimate or Windows 8/8.1 Pro key. Assuming it's a legitimate key and you are running Windows 10 version 1511 or later, your activation should complete successfully.

If that process seems cumbersome, you're right. It does go fairly quickly, however.
#155
Aux - Setup (2 blinks) - 11144 (2 blinks)
Aux - Setup (2 blinks) - 994 - Setup - 00169 - Vol Up - Should get 2 blinks
Aux - Setup (2 blinks) - 994 - Setup - 00168 - Vol Down - Should get 2 blinks
Aux - Setup (2 blinks) - 994 - Setup - 00037 - Mute - Should get 2 blinks
Aux - Setup (2 blinks) - 994 - Setup - 00165 - Power - Should get 2 blinks
Aux - Setup (2 blinks) - 994 - Setup - 00164 - Input - Should get 2 blinks
#156
Windows Fixes / Show RDP connections command line
May 09, 2016, 02:56:36 PM
qwinsta /server:server       which will list the current sessions and their status,

rwinsta /server:server <sessionid>     This is to disconnect a session.
#157
Adjust ADMINISTRATION/Default job options/image adjustment.
Select DARKNESS = 0. Save and Home.   
Try to scan again and all should be well.
#158
Windows Fixes / Windows 10 Delete User Picture
April 05, 2016, 04:42:47 PM
 Do a search for "Default Picture" put on desktop or some folder to find then open setting and choose user pic to set.
#159
General Discussion / Stop AVG ads
March 30, 2016, 09:04:05 AM
I found an answer through some easy googling that seems to have worked...there are three folders in the AVG folder in Program Files that you need to delete, but you have to disable avg first...

1. Disable AVG self protection:
Right click the AVG icon in the taskbar (near the clock)
Select to Temporarily Disable AVG Protection
Agree the default timeout - usually 10 minutes?​
2. Open My Computer or Windows Explorer and Navigate to:
C:\Program Files\AVG\AVG201x\ ...... for 32bit systems (201x means 2013 or 2014)
C:\Program Files (x86)\AVG\AVG201x\ for 64bit systems​
3. Delete the following three folders: Awacs, Banners, Tuneup
Do not delete anything else you see inside the AVG201x folder.
If you accidentally delete anything else go to the recycle bin and restore it.
Note: If you have already paid for the Tuneup addon then keep this folder​
4. Close the My Computer/Explorer window
5. Enable AVG self protection:
Right click the AVG icon in the taskbar (near the clock)
Select to Enable AVG Protection - takes 20 seconds or so to fully activate.​
#160
Raspberry Pi / Find UID and GID
March 10, 2016, 06:06:27 PM
To find the uid and gid for your username, use the following command:

id username