Sunday, 12 March 2017

Scout County Survivor - Air drop Token hunt challenge

3 rock Scout County
Survivor Token Map Challenge


An aircraft has been heard flying overhead. Your team catch
a brief glimpse of the aircraft through storm clouds. It is being
severely buffeted by strong winds. You see multiple things
are dropped. Some items fall quickly, other items blow in the
wind. Shortly afterwards some leaflets are seen floating down
from the sky.

The leaflets say:

Dear Survivors,

Please be assured help is on the way. We hope that rescue
teams will reach you in approx. 24 hours.
Due to rough terrain and poor visibility we have had difficulty
pinpointing your location from the air. Supplies have been
dropped at several locations that we think you may be able to
reach. Please see approximate locations of drops on the
map.

DO NOT RISK INJURY TO YOURSELVES as you will have
to survive independantly until rescue!

(IN REAL LIFE: Look for triangular survivor tokens. You should retrieve the token, bring it to Scout Leaders Area and redeem it for items recovered from supply drop cache.)


PDF and Inkscape SVGZ TOKENS: Food, Shelter, Fire, First Aid

https://drive.google.com/drive/folders/0B03nt669Z-O0Mms0UGhfRHU3NXM?usp=sharing

Tuesday, 17 January 2017

weekend B(ullet?)Log, fix guitar, bike maintenance, photo sync, visit Limerick

Thur
 x repair Maeve's guitar using wood glue, leave for 48hrs

Sat
 - Drove down & back from Limerick. Met Eimear&Stephen&Aoife.
 x rsync'd photos james laptop -> USB drive
 x look for Maeve school photos -  found a few cute ones but not for sending to journal
 x Strung/tuned guitar. But as strings tightened glue stretched :-(

Sun
  x fix guitar with superglue
  x fix Kate bike one set brake pads replaced
  x fix Maeve bike brake squeal (brake cables oiled, tightened // front brake pads fully off and back on - nuts were in ok order // BALANCED each side of brakes front and back (spring adjusted screws both sides)
  x fix James bike disc brake pads (from Halfords) back brake was worn just down to metal, front brake less worn but replaced
  x fixed 3 bike tubes
  x Strung/tuned guitar. But as strings tightened glue stretched :-(

Mon
  x Strung/tuned guitar. But the superglue is not holding.
  x Repair guitar using glue + bracket. (cut the bracket)
  x Strung/tuned guitar. repair is holding.
  . guitar bracket flush, round bottom corner, hammer a curve in it
  - need a mini-anvil :)

Tue
  x morn: tuned guitar - it's starting to hold in tune ok, Maeve tested it

Books
  x gave rationality.pdf Harry Potter to Kate/...
  . reading graphic novel last man Y

for Wed/future . . .
  . Glenmalure hike plan
  . scouts plan hike for Jan/Feb ?
  . scouts PLC . . long term plan . . adventures, skills, special interest, Survivor, County Cup
  . scouts Annual Camp plans
  . scouts County meetings/activities
  . scouts James leader training
  . Cycling submission: DART crossing/Booterstown
  . DLR fernhill submission


Looked @ Bullet Journal mechanics:

http://bulletjournal.com/get-started/

https://www.buzzfeed.com/rachelwmiller/how-to-start-a-bullet-journal

https://youtu.be/fm15cmYU0IM



This blog acts as an occasional diary or article log for me.
I have a book for Scouts and work which is diary/planner journal.
I have often scrappy bits of paper with task lists or planning ideas.
Also task manager app, google calendar, gmail, .. .



 

Thursday, 3 November 2016

rsync from android MTP . . freezy/hangy problems. s/rsync/crude script/

Samsung Galaxy Nexus.
3.8G of photos in internal storage.
Options are MTP "mounting" or PTP.
Ubuntu 14.xx

1.

First attempt copying using file manager . . . started out okay. Reported 3.8G will be copied over in 7 mins . . 15 mins . . later 1 hour and x mins. And it was getting stuck / hanging up (looked like at the same point).

Unplug/replug USB did not bring back MTP connection after hang. Needed to go to phone USB computer connection Settings and un-check and then re-check MTP to recover it.

2.

rsync
cd /run/user/1000/gvfs/
cd mtp* # e.g. mtp::host=%5Busb%3A001%2C017%5D/
cd "Internal storage/DCIM"
rsync -avzhP ./ ~/Pictures/201611FionnOldMobilePhone/DCIM/
see errors like this:

          1.59M 100%    1.67MB/s    0:00:00 (xfr#1834, to-chk=957/2800)
Camera/IMG_20130808_123846.jpg
          1.98M 100%    1.25MB/s    0:00:01 (xfr#1835, to-chk=956/2800)
rsync: read errors mapping "/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C017%5D/Internal storage/DCIM/Camera/IMG_20130808_123846.jpg": No data available (61)
Camera/IMG_20130808_123902.jpg
          1.43M 100%    1.57MB/s    0:00:00 (xfr#1836, to-chk=955/2800)
rsync: read errors mapping "/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C017%5D/Internal storage/DCIM/Camera/IMG_20130808_123902.jpg": No data available (61)
Camera/IMG_20130808_124320.jpg
          1.58M 100%    1.21MB/s    0:00:01 (xfr#1837, to-chk=954/2800)
rsync: read errors mapping "/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C017%5D/Internal storage/DCIM/Camera/IMG_20130808_124320.jpg": No data available (61)
Camera/IMG_20130808_124435.jpg
          1.54M 100%    2.00MB/s    0:00:00 (xfr#1838, to-chk=953/2800)
rsync: read errors mapping "/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C017%5D/Internal storage/DCIM/Camera/IMG_20130808_124435.jpg": No data available (61)
Camera/IMG_20130808_124530.jpg
          1.90M 100%    1.54MB/s    0:00:01 (xfr#1839, to-chk=952/2800)
rsync: read errors mapping "/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C017%5D/Internal storage/DCIM/Camera/IMG_20130808_124530.jpg": No data available (61)
Camera/IMG_20130808_124625.jpg
         32.77K   1%  126.98kB/s    0:00:17 
. . restarted . .
. . stuck again . . 

. . seemed to be getting stuck on the same files . . 
 
These errors seem to be encountered if rsyncing from files which get changed while sync happens.  I think android should not be changing them. I don't think MTP would expose corrupt disk problem ? Something like antivirus locking the files should not be problem. Anyway, MTP connection a bit flaky . . maybe something on the android side is locking files or MTP drivers are a bit funny.
 
3.
 
Tried rsync with --remove-source-files on whole and on file selections (e.g. Camera/IMG_201606*) still got stuck. Each time after hang needed to go into droid unselect MTP and select again to connect again. At least files to be checked/transferred are being reduced now by removing them after they are synced.



    rsync -avzhP --remove-source-files ./ ~/Pictures/201611FionnOldMobilePhone/DCIM/

4.
 
rsync was getting stuck on the same file all the time. cp seemed to have less of a hanging problem. more tolerant of read errors? So made a script to do copy and remove if copy successful.

    # Script using cp -p (and remove files as we go)
    DEST=/home/jamesc/Pictures/201611FionnOldMobilePhone/DCIM/Camera/
    cd /run/user/1000/gvfs/mtp*/Intern*/DCIM
    FILES=$(ls Camera/)
    for f in $FILES; do echo -n $f; cp -p Camera/$f $DEST/ && rm Camera/$f && echo success; done

This was run in a while true loop periodically recovering MTP connection when it hung.
 
      while true; do ~/bin/sync_flaky_mtp.sh; sleep 1; done

The script saw some funny errors e.g. :
 
    IMG_20130814_113108.jpgsuccess
    IMG_20130815_145354.jpgsuccess
    IMG_20130815_145455.jpgcp: error reading ‘Camera/IMG_20130815_145455.jpg’: Input/output error
    cp: failed to extend ‘/home/jamesc/Pictures/201611FionnOldMobilePhone/DCIM/Camera/IMG_20130815_145455.jpg’: Input/output error
    IMG_20130815_145500.jpgsuccess
    IMG_20130815_151552.jpgsuccess
    . . .
    IMG_20130824_095526.jpgsuccess
    IMG_20130824_095537.jpg

And it would hang . . . periodically recovered MTP connection as already described.
 
5.
 
The script evolved . . . 

    Binary files Camera/IMG_20160104_095626.jpg and /home/jamesc/Pictures/201611FionnOldMobilePhone/DCIM/Camera//IMG_20160104_095626.jpg differ
    IMG_20160104_100128.jpgalready
    RM
    IMG_20160104_100157.jpgalready

       #!/bin/bash
DEST=/home/jamesc/Pictures/201611FionnOldMobilePhone/DCIM/Camera/
cd /run/user/1000/gvfs/mtp*/Intern*/DCIM
FILES=$(ls Camera/)
#echo FILES=$FILES
ls Camera/ |wc -l
for f in $FILES; do
   echo -n $f;
   if [[ ! -e $DEST/$f ]]; then
      # the timeout doesn't work on frozen mtp file
             # we run this full script in a while true; do ~/bin/sync_flaky_mtp.sh; sleep 1; done loop
             # and periodically visit, if stuck unlock phone, deselect MTP and select it again
             # (to interrupt and restart MTP connection)
             # simply unplug & replug doesn't bring MTP connection back ok
      timeout 20s cp -p Camera/$f $DEST/ && rm Camera/$f && echo success;
   else
      echo already done by earlier script which did not tidy up;
      diff -u Camera/$f $DEST/$f
      if [[ $? == 0 ]]; then
         rm Camera/$f && echo RM
      else
         # doing this copy on the weird files causes nasty freezy freezes.
         #cp -p Camera/$f $DEST/$f && rm Camera/$f && echo success;
                # ALOT of files found to be a few bytes different.
                # another copy caused hanging . . . so if dest file kindof looks ok we just remove source
         identify $DEST/$f && rm Camera/$f && echo RM
      fi
   fi;
done

beep

    # a few bytes in size different
    ls -al Camera/IMG_20150117_171621.jpg $DEST/Camera/IMG_20150117_171621.jpg
      -rw------- 1 jamesc jamesc 1277901 Jan 17  2015 Camera/IMG_20150117_171621.jpg
      -rwxr----- 1 jamesc jamesc 1275306 Nov  3 01:09 $DEST/Camera/IMG_20150117_171621.jpg
 
    # copy again ? results in same size difference, date/time fixed up though
    cp -p Camera/IMG_20150117_171621.jpg $DEST/Camera/IMG_20150117_171621.jpg
    ls -al Camera/IMG_20150117_171621.jpg $DEST/Camera/IMG_20150117_171621.jpg
      -rw------- 1 jamesc jamesc 1277901 Jan 17  2015 Camera/IMG_20150117_171621.jpg
      -rw------- 1 jamesc jamesc 1275306 Jan 17  2015 $DEST/Camera/IMG_20150117_171621.jpg
    diff -u Camera/IMG_20150117_171621.jpg $DEST/Camera/IMG_20150117_171621.jpg
      Binary files Camera/IMG_20150117_171621.jpg and $DEST/Camera/IMG_20150117_171621.jpg differ

So EVENTUALLY by removing files we had already copied we had less and less to do and got through all files. Phew. And yay.

    du -h $DEST/.. --max-depth=0
      3.6G    /home/jamesc/Pictures/201611FionnOldMobilePhone/DCIM/Camera//..


Various other reading . . . 



Tuesday, 18 October 2016

char c; int i; c[&i]; // index a simple var using pointer in c compiles (and runs often without segfault)


    char c;
    int i;
    printf("%02x",c[&i]);
    //printf("%02x",c[i]); // doesn't compile, error, cannot access c as array
    // "error: subscripted value is neither array nor pointer nor vector"


c[&i] there is SOOOO BAD and WROOONG. Semantically wrong. But apparently not syntactically wrong in c.

Why does it compile?
Because 1. array[i] == *(array+i) == *(i+array) == i[array]
And 2. c casts char to int happily

In case of c[&i] c is the index added to pointer &i.
Now &i + value of c indexes an undefined area of memory so it is not good to use this!!


    char c;
    int i[10];
    // normal access into array (bad to use a char as array index though)
    for(c=0;c<10;c++) printf("%02x",i[c]); // normal-ish
    for(c=0;c<10;c++) printf("%02x",*(i+c)); // equivalent pointer arithmetic
    for(c=0;c<10;c++) printf("%02x",*(c+i)); // equivalent
    for(c=0;c<10;c++) printf("%02x",c[i]);    // allowed BUT NOT NORMAL



    char c;
    int i;
    int buffer[20]; // buffer helps prog not seg fault!
    // abnormal access into memory at offset of (int)c from &i
    //for(c=0;c<10;c++) printf("%02x",&i[c]); // COMPILE ERROR
    for(c=0;c<10;c++) printf("%02x",*(&i+c)); // a bit weird
    for(c=0;c<10;c++) printf("%02x",*(c+&i)); // not normal
    for(c=0;c<10;c++) printf("%02x",c[&i]);    // but it compiles and runs(mostly)

    for(c=0;c<10;c++) printf("%02x,",i[&c]); // this is all
    printf(" ");
    for(c=0;c<10;c++) printf("%02x,",*(i+&c)); // a bit weird
    printf(" ");
    for(c=0;c<10;c++) printf("%02x,",*(&c+i)); // not normal
    //for(c=0;c<10;c++) printf("%02x,",&c[i]);    // COMPILE ERROR
    printf("\n");



While answering this question:
http://stackoverflow.com/questions/40116073/c-duplicate-character-character-by-character/40117178#40117178

Asked this question:
http://stackoverflow.com/questions/40118549/in-c-ci-compiles-where-c-and-i-are-variables-not-arrays-pointers-but-i

Monday, 26 September 2016

Reset Windows 7 Administrator account (or any user account) password

Had some fun on Sunday trying to get access to Admin account on Windows 7 laptop. 
I attempted some other methods but what eventually worked for me was a bit of a hack/trick. Replace sethc.exe (sticky keys) with cmd.exe and trigger sticky keys (sticky keys is run as Administrator). This was done through using Notepad.exe which is run to view logfiles after system recovery. Other techniques to get in on command-line as admin with drive mounted didn't work. This trick is at least quite amusing :-) also simple and portable :-D. 
Background: The Administrator password with laptop was not known. There was a user account with admin privs so users didn't find the need of it. UNTIL the windows login page stopped showing their user! We are guessing the User profile became corrupt or had something bad in it.
I attempted a series of procedures before getting the Notepad+sticky keys replace hack to work. For the record here they are (and the problem I encountered with them):
  1. When trying to log in as Administrator after an incorrect password you are prompted to insert rescue disk (in order to reset password). We had a Windows 7 rescue disk on cd. But the prompt asked for floppy or USB. I had no handy USB stick and was too lazy to go shopping and messing with creating USB boot disk.
  2. Using system repair disk to get in on command-line did not allow the replacing of sethc.exe with cmd.exe trick/hack. Or allow resetting admin password 'net use Administrator *'. The command-line was running as admin but not as the real admin on machine more as the system repair admin and the disk did not seem to be mounted with full access . . . ~ not sure ~
  3. Using linux system rescue cd (https://www.system-rescue-cd.org (version 4.8.2)) I could not mount the drive. I would kindof see it was a GPT partitioned drive - tools ntfs-3g gparted sfdisk should work with GPT but didn't. This computer has a prompt for username + domain + password before windows starts so not sure but maybe there is some extra security (which is needed to mount drive?)
  4. We looked at recovering the User Profile - editing registry - but . . . 
What eventually DID work was follow system recover sequence (no external/additional cd needed) at end view logfile (opens in Notepad). Then do file open - browse to cmd.exe - copy - paste - overwrite sethc.exe. Then reboot - trigger sticky keys - set password using command-line 'net user Administrator *'.
Procedure:
  1. Shutdown and reboot. When Windows starting is seen hold down the power button and power off.
  2. Power on. Windows boot should report that last Windows start up failed so it will give the option of "Launch startup repair". Choose this option.
  3. Cancel the Startup Repair. Cancel the System Restore.
  4. A report dialog will show reporting repair could not be done. In there expand "View problem details". Under problem details a link to x:/windows/... log file is shown. Click on this.
  5. Notepad.exe opens showing the logfile. This Notepad is running as Administrator and the mounted filesystem x: is your hard disk.
    5.1 Notepad: File - Open - browse to X:/Windows/system32 - scroll to sethc.exe
    5.2 Right-click on sethc.exe and rename to sethc-BACKUP.exe
    5.3 Scroll to cmd.exe. Right-click on cmd.exe. Copy. Right click. Paste.
    5.4. When I pasted cmd.exe the command-line ran (as Administrator) so I did 'cd x:/Windows/system32' and then 'copy cmd.exe sethc.exe' on command-line.
    5.4-1 If you prefer not command-line then just use Notepad File Open browser and make a copy of cmd.exe and rename it to sethc.exe
  6. Reboot without any funny stuff.
  7. At login page hit shift key 5 times or more triggering sticky keys. Instead of sticky keys prompt a command-line dialog appears. Running as Administrator. 'net user Administrator *' to set the password.
Good description with screenshots of the procedure here: http://null-byte.wonderhowto.com/how-to/hack-windows-7-become-admin-0160151/

The rsync of old user to new user after successful recover. And a game of blockus :-)


In conclusion, this solution doesn't require you to have any extra boot or repair CD. It is very portable :-) It is pretty simple. So it is probably worth trying as one of the first password recovery methods.
We finished up Sunday with making a new user, failing to copy files from old user -> new user using windows, installing cygwin with rsync, rsyncing from old user -> new user (-avzhP and excluding ntdata files and a few other). Then backing up stuff generally. Took ages (3/4hours?) but successful recover at the end, phew.

Saturday, 24 September 2016

Recipe: Mackerel with spinach and apple

Recipe: Mackerel with spinach and apple

As usual winging it in the kitchen. Successful and tasty soup and fish for tea today.
The selection of ingredients depends often on what is there, what needs to be used.

Apple baked with the mackerel was a nice combination. James & Fionnuala and the girls liked it alot.

Ingredients:
    2 plums
    2-3 tomatoes
    4 mushrooms (optional but good especially if you have a wife who loves them!)
    half a red onion
    mackerel - 3 fillets (Aldi's best)
    apple - tart(as in a bit sour) (my Mum and Dad brought some up from Cobh this Monday)
    spinach - we got a bag with the organic fruit & veg box
    oil, salt, pepper
    squeeze of lemon

Method:
   Turn on oven ~190 degrees.
   De-stone and slice plums, slice tomatoes, slice & dice onion, remove stalk from mushrooms.
   Put those in pyrex baking dish (some oil in first) and mix and put in oven.
   Shred/Chop some spinach - add spinach to dish in oven and mix in.
      (this was done a while after the rest baked a bit as I was making soup @ the same time).
   Add a small amount of lemon juice to dish in oven.
   Stir the dish in oven once or twice.
   Keep 3 large spinach leaves aside for the fish.

   Slice apple into wedges (quarter the apple, remove core/pips, slice).
   Take fish out of packet, rinse.
   Lay fish on a dish(I had it in a jug), season, put on oil, put apple on top.
   Squeeze on a small amount of lemon juice.
 
   13 mins to serving time put on the fish:
       Lay each fillet on a spinach leaf and lay wedges of apple on top.
       Lay side by side on top of the dish in oven.

   The apple stuck to top of mackerel and spinach stuck under.
   The spinach+fish+apple were easy to lift off and put on plate.
   Serve the mix underneath beside the fish.

https://en.wikipedia.org/wiki/Mackerel

--------------------------------------
We had soup with fish (and for he who didn't fancy fish):

Soup with 3 potatoes diced, half a butternut squash (deseeded but with skin) diced, 1 leek, 2 small carrots diced, some turmeric (the real root - small slices), grated ginger, chopped spinach, a black chilli pepper, a jug of vegetable broth(or stock), water, seasoning (salt, pepper, curry powder)
In that order (more or less) add ingredients and fry with oil first. Stirring frequently. If taking too long dicing and there is danger of burning then add some broth. You want to fry/broil the hard veg for a bit. I had broth from cooking potatoes + carrot + onion earlier in day. Add enough water at end to give a nice soup consistency not too thick. Spinach was added at end after heat was turned off.
After all cooked then buzz to smooth.

Serve with toast & butter.

--------------------------------------
Earlier on we had mash potato with black pudding, brocolli and eggs. (and some beans)

Mashed potato.
Potatoes roughly chopped. Carrot diced. Onion diced.
Boil potatoes with a small amount of salt in water. (some brine from an olive jar does nicely)
Add carrot and onion.
When potatoes  cooked (not soft/disentegrating) drain.
Keep the broth for making soup later.
Add some butter and a splash on milk.
Mash.

Serve with black pudding, egg, brocolli stalk and head fried with turmeric.
--------------------------------------

Friday, 5 August 2016

Major and minor chord notes and positions on guitar fretboard.

Useful for when you figure out nots in a tune and wish to fit chords to play along.


Major and Minor chord notes

A  Major chord  A   C#  E   A
A  Minor chord  A   C   E   A
A# Major chord  A#  D   F   A#
A# Minor chord  A#  C#  F   A#
B  Major chord  B   D#  F#  B
B  Minor chord  B   D   F#  B
C  Major chord  C   E   G   C
C  Minor chord  C   D#  G   C
C# Major chord  C#  F   G#  C#
C# Minor chord  C#  E   G#  C#
D  Major chord  D   F#  A   D
D  Minor chord  D   F   A   D
D# Major chord  D#  G   A#  D#
D# Minor chord  D#  F#  A#  D#
E  Major chord  E   G#  B   E
E  Minor chord  E   G   B   E
F  Major chord  F   A   C   F
F  Minor chord  F   G#  C   F
F# Major chord  F#  A#  C#  F#
F# Minor chord  F#  A   C#  F#
G  Major chord  G   B   D   G
G  Minor chord  G   A#  D   G
G# Major chord  G#  C   D#  G#
G# Minor chord  G#  B   D#  G#

Major chords on the fretboard:

 
A Major:
||| E |   |   |   |   | A |   |   |   | C#|   |   | E |   |   |   |   | A |   |   |
|||   |   | C#|   |   | E |   |   |   |   | A |   |   |   | C#|   |   | E |   |   |
|||   |   | A |   |   |   | C#|   |   | E |   |   |   |   | A |   |   |   | C#|   |
|||   |   | E |   |   |   |   | A |   |   |   | C#|   |   | E |   |   |   |   | A |
||| A |   |   |   | C#|   |   | E |   |   |   |   | A |   |   |   | C#|   |   | E |
||| E |   |   |   |   | A |   |   |   | C#|   |   | E |   |   |   |   | A |   |   |
A# Major:
|||   | F |   |   |   |   | A#|   |   |   | D |   |   | F |   |   |   |   | A#|   |
|||   |   |   | D |   |   | F |   |   |   |   | A#|   |   |   | D |   |   | F |   |
|||   |   |   | A#|   |   |   | D |   |   | F |   |   |   |   | A#|   |   |   | D |
||| D |   |   | F |   |   |   |   | A#|   |   |   | D |   |   | F |   |   |   |   |
|||   | A#|   |   |   | D |   |   | F |   |   |   |   | A#|   |   |   | D |   |   |
|||   | F |   |   |   |   | A#|   |   |   | D |   |   | F |   |   |   |   | A#|   |
B Major:
|||   |   | F#|   |   |   |   | B |   |   |   | D#|   |   | F#|   |   |   |   | B |
||| B |   |   |   | D#|   |   | F#|   |   |   |   | B |   |   |   | D#|   |   | F#|
|||   |   |   |   | B |   |   |   | D#|   |   | F#|   |   |   |   | B |   |   |   |
|||   | D#|   |   | F#|   |   |   |   | B |   |   |   | D#|   |   | F#|   |   |   |
|||   |   | B |   |   |   | D#|   |   | F#|   |   |   |   | B |   |   |   | D#|   |
|||   |   | F#|   |   |   |   | B |   |   |   | D#|   |   | F#|   |   |   |   | B |
C Major:
||| E |   |   | G |   |   |   |   | C |   |   |   | E |   |   | G |   |   |   |   |
|||   | C |   |   |   | E |   |   | G |   |   |   |   | C |   |   |   | E |   |   |
||| G |   |   |   |   | C |   |   |   | E |   |   | G |   |   |   |   | C |   |   |
|||   |   | E |   |   | G |   |   |   |   | C |   |   |   | E |   |   | G |   |   |
|||   |   |   | C |   |   |   | E |   |   | G |   |   |   |   | C |   |   |   | E |
||| E |   |   | G |   |   |   |   | C |   |   |   | E |   |   | G |   |   |   |   |
C# Major:
|||   | F |   |   | G#|   |   |   |   | C#|   |   |   | F |   |   | G#|   |   |   |
|||   |   | C#|   |   |   | F |   |   | G#|   |   |   |   | C#|   |   |   | F |   |
|||   | G#|   |   |   |   | C#|   |   |   | F |   |   | G#|   |   |   |   | C#|   |
|||   |   |   | F |   |   | G#|   |   |   |   | C#|   |   |   | F |   |   | G#|   |
|||   |   |   |   | C#|   |   |   | F |   |   | G#|   |   |   |   | C#|   |   |   |
|||   | F |   |   | G#|   |   |   |   | C#|   |   |   | F |   |   | G#|   |   |   |
D Major:
|||   |   | F#|   |   | A |   |   |   |   | D |   |   |   | F#|   |   | A |   |   |
|||   |   |   | D |   |   |   | F#|   |   | A |   |   |   |   | D |   |   |   | F#|
|||   |   | A |   |   |   |   | D |   |   |   | F#|   |   | A |   |   |   |   | D |
||| D |   |   |   | F#|   |   | A |   |   |   |   | D |   |   |   | F#|   |   | A |
||| A |   |   |   |   | D |   |   |   | F#|   |   | A |   |   |   |   | D |   |   |
|||   |   | F#|   |   | A |   |   |   |   | D |   |   |   | F#|   |   | A |   |   |
D# Major:
|||   |   |   | G |   |   | A#|   |   |   |   | D#|   |   |   | G |   |   | A#|   |
|||   |   |   |   | D#|   |   |   | G |   |   | A#|   |   |   |   | D#|   |   |   |
||| G |   |   | A#|   |   |   |   | D#|   |   |   | G |   |   | A#|   |   |   |   |
|||   | D#|   |   |   | G |   |   | A#|   |   |   |   | D#|   |   |   | G |   |   |
|||   | A#|   |   |   |   | D#|   |   |   | G |   |   | A#|   |   |   |   | D#|   |
|||   |   |   | G |   |   | A#|   |   |   |   | D#|   |   |   | G |   |   | A#|   |
E Major:
||| E |   |   |   | G#|   |   | B |   |   |   |   | E |   |   |   | G#|   |   | B |
||| B |   |   |   |   | E |   |   |   | G#|   |   | B |   |   |   |   | E |   |   |
|||   | G#|   |   | B |   |   |   |   | E |   |   |   | G#|   |   | B |   |   |   |
|||   |   | E |   |   |   | G#|   |   | B |   |   |   |   | E |   |   |   | G#|   |
|||   |   | B |   |   |   |   | E |   |   |   | G#|   |   | B |   |   |   |   | E |
||| E |   |   |   | G#|   |   | B |   |   |   |   | E |   |   |   | G#|   |   | B |
F Major:
|||   | F |   |   |   | A |   |   | C |   |   |   |   | F |   |   |   | A |   |   |
|||   | C |   |   |   |   | F |   |   |   | A |   |   | C |   |   |   |   | F |   |
|||   |   | A |   |   | C |   |   |   |   | F |   |   |   | A |   |   | C |   |   |
|||   |   |   | F |   |   |   | A |   |   | C |   |   |   |   | F |   |   |   | A |
||| A |   |   | C |   |   |   |   | F |   |   |   | A |   |   | C |   |   |   |   |
|||   | F |   |   |   | A |   |   | C |   |   |   |   | F |   |   |   | A |   |   |
F# Major:
|||   |   | F#|   |   |   | A#|   |   | C#|   |   |   |   | F#|   |   |   | A#|   |
|||   |   | C#|   |   |   |   | F#|   |   |   | A#|   |   | C#|   |   |   |   | F#|
|||   |   |   | A#|   |   | C#|   |   |   |   | F#|   |   |   | A#|   |   | C#|   |
|||   |   |   |   | F#|   |   |   | A#|   |   | C#|   |   |   |   | F#|   |   |   |
|||   | A#|   |   | C#|   |   |   |   | F#|   |   |   | A#|   |   | C#|   |   |   |
|||   |   | F#|   |   |   | A#|   |   | C#|   |   |   |   | F#|   |   |   | A#|   |
G Major:
|||   |   |   | G |   |   |   | B |   |   | D |   |   |   |   | G |   |   |   | B |
||| B |   |   | D |   |   |   |   | G |   |   |   | B |   |   | D |   |   |   |   |
||| G |   |   |   | B |   |   | D |   |   |   |   | G |   |   |   | B |   |   | D |
||| D |   |   |   |   | G |   |   |   | B |   |   | D |   |   |   |   | G |   |   |
|||   |   | B |   |   | D |   |   |   |   | G |   |   |   | B |   |   | D |   |   |
|||   |   |   | G |   |   |   | B |   |   | D |   |   |   |   | G |   |   |   | B |
G# Major:
|||   |   |   |   | G#|   |   |   | C |   |   | D#|   |   |   |   | G#|   |   |   |
|||   | C |   |   | D#|   |   |   |   | G#|   |   |   | C |   |   | D#|   |   |   |
|||   | G#|   |   |   | C |   |   | D#|   |   |   |   | G#|   |   |   | C |   |   |
|||   | D#|   |   |   |   | G#|   |   |   | C |   |   | D#|   |   |   |   | G#|   |
|||   |   |   | C |   |   | D#|   |   |   |   | G#|   |   |   | C |   |   | D#|   |
|||   |   |   |   | G#|   |   |   | C |   |   | D#|   |   |   |   | G#|   |   |   |

Minor chords on the fretboard

A Major:
||| E |   |   |   |   | A |   |   | C |   |   |   | E |   |   |   |   | A |   |   |
|||   | C |   |   |   | E |   |   |   |   | A |   |   | C |   |   |   | E |   |   |
|||   |   | A |   |   | C |   |   |   | E |   |   |   |   | A |   |   | C |   |   |
|||   |   | E |   |   |   |   | A |   |   | C |   |   |   | E |   |   |   |   | A |
||| A |   |   | C |   |   |   | E |   |   |   |   | A |   |   | C |   |   |   | E |
||| E |   |   |   |   | A |   |   | C |   |   |   | E |   |   |   |   | A |   |   |
A# Major:
|||   | F |   |   |   |   | A#|   |   | C#|   |   |   | F |   |   |   |   | A#|   |
|||   |   | C#|   |   |   | F |   |   |   |   | A#|   |   | C#|   |   |   | F |   |
|||   |   |   | A#|   |   | C#|   |   |   | F |   |   |   |   | A#|   |   | C#|   |
|||   |   |   | F |   |   |   |   | A#|   |   | C#|   |   |   | F |   |   |   |   |
|||   | A#|   |   | C#|   |   |   | F |   |   |   |   | A#|   |   | C#|   |   |   |
|||   | F |   |   |   |   | A#|   |   | C#|   |   |   | F |   |   |   |   | A#|   |
B Major:
|||   |   | F#|   |   |   |   | B |   |   | D |   |   |   | F#|   |   |   |   | B |
||| B |   |   | D |   |   |   | F#|   |   |   |   | B |   |   | D |   |   |   | F#|
|||   |   |   |   | B |   |   | D |   |   |   | F#|   |   |   |   | B |   |   | D |
||| D |   |   |   | F#|   |   |   |   | B |   |   | D |   |   |   | F#|   |   |   |
|||   |   | B |   |   | D |   |   |   | F#|   |   |   |   | B |   |   | D |   |   |
|||   |   | F#|   |   |   |   | B |   |   | D |   |   |   | F#|   |   |   |   | B |
C Major:
|||   |   |   | G |   |   |   |   | C |   |   | D#|   |   |   | G |   |   |   |   |
|||   | C |   |   | D#|   |   |   | G |   |   |   |   | C |   |   | D#|   |   |   |
||| G |   |   |   |   | C |   |   | D#|   |   |   | G |   |   |   |   | C |   |   |
|||   | D#|   |   |   | G |   |   |   |   | C |   |   | D#|   |   |   | G |   |   |
|||   |   |   | C |   |   | D#|   |   |   | G |   |   |   |   | C |   |   | D#|   |
|||   |   |   | G |   |   |   |   | C |   |   | D#|   |   |   | G |   |   |   |   |
C# Major:
||| E |   |   |   | G#|   |   |   |   | C#|   |   | E |   |   |   | G#|   |   |   |
|||   |   | C#|   |   | E |   |   |   | G#|   |   |   |   | C#|   |   | E |   |   |
|||   | G#|   |   |   |   | C#|   |   | E |   |   |   | G#|   |   |   |   | C#|   |
|||   |   | E |   |   |   | G#|   |   |   |   | C#|   |   | E |   |   |   | G#|   |
|||   |   |   |   | C#|   |   | E |   |   |   | G#|   |   |   |   | C#|   |   | E |
||| E |   |   |   | G#|   |   |   |   | C#|   |   | E |   |   |   | G#|   |   |   |
D Major:
|||   | F |   |   |   | A |   |   |   |   | D |   |   | F |   |   |   | A |   |   |
|||   |   |   | D |   |   | F |   |   |   | A |   |   |   |   | D |   |   | F |   |
|||   |   | A |   |   |   |   | D |   |   | F |   |   |   | A |   |   |   |   | D |
||| D |   |   | F |   |   |   | A |   |   |   |   | D |   |   | F |   |   |   | A |
||| A |   |   |   |   | D |   |   | F |   |   |   | A |   |   |   |   | D |   |   |
|||   | F |   |   |   | A |   |   |   |   | D |   |   | F |   |   |   | A |   |   |
D# Major:
|||   |   | F#|   |   |   | A#|   |   |   |   | D#|   |   | F#|   |   |   | A#|   |
|||   |   |   |   | D#|   |   | F#|   |   |   | A#|   |   |   |   | D#|   |   | F#|
|||   |   |   | A#|   |   |   |   | D#|   |   | F#|   |   |   | A#|   |   |   |   |
|||   | D#|   |   | F#|   |   |   | A#|   |   |   |   | D#|   |   | F#|   |   |   |
|||   | A#|   |   |   |   | D#|   |   | F#|   |   |   | A#|   |   |   |   | D#|   |
|||   |   | F#|   |   |   | A#|   |   |   |   | D#|   |   | F#|   |   |   | A#|   |
E Major:
||| E |   |   | G |   |   |   | B |   |   |   |   | E |   |   | G |   |   |   | B |
||| B |   |   |   |   | E |   |   | G |   |   |   | B |   |   |   |   | E |   |   |
||| G |   |   |   | B |   |   |   |   | E |   |   | G |   |   |   | B |   |   |   |
|||   |   | E |   |   | G |   |   |   | B |   |   |   |   | E |   |   | G |   |   |
|||   |   | B |   |   |   |   | E |   |   | G |   |   |   | B |   |   |   |   | E |
||| E |   |   | G |   |   |   | B |   |   |   |   | E |   |   | G |   |   |   | B |
F Major:
|||   | F |   |   | G#|   |   |   | C |   |   |   |   | F |   |   | G#|   |   |   |
|||   | C |   |   |   |   | F |   |   | G#|   |   |   | C |   |   |   |   | F |   |
|||   | G#|   |   |   | C |   |   |   |   | F |   |   | G#|   |   |   | C |   |   |
|||   |   |   | F |   |   | G#|   |   |   | C |   |   |   |   | F |   |   | G#|   |
|||   |   |   | C |   |   |   |   | F |   |   | G#|   |   |   | C |   |   |   |   |
|||   | F |   |   | G#|   |   |   | C |   |   |   |   | F |   |   | G#|   |   |   |
F# Major:
|||   |   | F#|   |   | A |   |   |   | C#|   |   |   |   | F#|   |   | A |   |   |
|||   |   | C#|   |   |   |   | F#|   |   | A |   |   |   | C#|   |   |   |   | F#|
|||   |   | A |   |   |   | C#|   |   |   |   | F#|   |   | A |   |   |   | C#|   |
|||   |   |   |   | F#|   |   | A |   |   |   | C#|   |   |   |   | F#|   |   | A |
||| A |   |   |   | C#|   |   |   |   | F#|   |   | A |   |   |   | C#|   |   |   |
|||   |   | F#|   |   | A |   |   |   | C#|   |   |   |   | F#|   |   | A |   |   |
G Major:
|||   |   |   | G |   |   | A#|   |   |   | D |   |   |   |   | G |   |   | A#|   |
|||   |   |   | D |   |   |   |   | G |   |   | A#|   |   |   | D |   |   |   |   |
||| G |   |   | A#|   |   |   | D |   |   |   |   | G |   |   | A#|   |   |   | D |
||| D |   |   |   |   | G |   |   | A#|   |   |   | D |   |   |   |   | G |   |   |
|||   | A#|   |   |   | D |   |   |   |   | G |   |   | A#|   |   |   | D |   |   |
|||   |   |   | G |   |   | A#|   |   |   | D |   |   |   |   | G |   |   | A#|   |
G# Major:
|||   |   |   |   | G#|   |   | B |   |   |   | D#|   |   |   |   | G#|   |   | B |
||| B |   |   |   | D#|   |   |   |   | G#|   |   | B |   |   |   | D#|   |   |   |
|||   | G#|   |   | B |   |   |   | D#|   |   |   |   | G#|   |   | B |   |   |   |
|||   | D#|   |   |   |   | G#|   |   | B |   |   |   | D#|   |   |   |   | G#|   |
|||   |   | B |   |   |   | D#|   |   |   |   | G#|   |   | B |   |   |   | D#|   |
|||   |   |   |   | G#|   |   | B |   |   |   | D#|   |   |   |   | G#|   |   | B |


G Major: G A B C D E F#

    0   1   2   3   4   5   6   7   8   9   10  11  12  13  14  15  16
||| E |   | F#| G |   | A |   | B | C |   | D |   | E |   | F#| G |   | A |   | B |
||| B | C |   | D |   | E |   | F#| G |   | A |   | B | C |   | D |   | E |   | F#|
||| G |   | A |   | B | C |   | D |   | E |   | F#| G |   | A |   | B | C |   | D |
||| D |   | E |   | F#| G |   | A |   | B | C |   | D |   | E |   | F#| G |   | A |
||| A |   | B | C |   | D |   | E |   | F#| G |   | A |   | B | C |   | D |   | E |
||| E |   | F#| G |   | A |   | B | C |   | D |   | E |   | F#| G |   | A |   | B |
           xxxxxxxxxxxxxxx
            Ionian key G => G(3)
                   xxxxxxxxxxxxxxxxxxx
                    Dorian key G => A(5)
                               xxxxxxxxxxxxxxx
                                Phyrgian key G => B(7)
                               xxxxxxxxxxxxxxx
                                Lydian key G => C(8)
                                       xxxxxxxxxxxxxxxxxxx
                                        Mixolydian key G => D(10)
                                               xxxxxxxxxxxxxxxxxxx
                                                Aeolian key G => E(12)
           xxxxxxxxxxxxxxx                                 xxxxxxxxxxxxxxx
                                                            Locrian key G => F#(14)



Mode name       Notes (all natural)
ionian mode     C, D, E, F, G, A, B, C
dorian mode     D, E, F, G, A, B, C, D
phrygian mode   E, F, G, A, B, C, D, E
lydian mode     F, G, A, B, C, D, E, F
mixolydian mode G, A, B, C, D, E, F, G
aeolian mode    A, B, C, D, E, F, G, A
locrian mode    B, C, D, E, F, G, A, B

e.g. G ionian mode(normal G major): G, A, B, C, D, E, F#, G.   g-ionian-mode g-major-scale
e.g. G phrygian mode: G, Ab, Bb, C, D, Eb, F, G.   g-phrygian-mode

e.g. A7 is A mixolydian: A, B, C#, D, E, F#, G, A    Root,3rd,5th,7th: A C# E G    on guitar: 002020 = EAEGC#E  (Rx1 3x1 5x3 7x1)  7th note is played (duhrr A7)

A  Major:  A   B   C#  D   E   F#  G#  A             Root,3rd,5th,7th: A C# E G#   on guitar: 002220 = EAEAC#E  (Rx2 3x1 5x3)
 major = ionian mode

A  Minor:  A   B   C   D   E   F   G   A             Root,3rd,5th,7th: A C E G     on guitar: 002200 = EAEACE   (Rx2 3x1 5x3)
 natural minor = aeolian mode