Annyce Davis

Davis Technology Consulting

  • Home
  • About Me
  • Blog
  • Courses
  • Newsletter

Print Screen for the Mac

August 3, 2009 by Annyce Davis

There is no Print Screen button on the Mac, so you must type the following to print the screen.

Shift + Command + 3 – This will send a png file to your desktop of entire page
Shift + Command + 4 – This will allow you to select what portion of the screen to capture

jQuery each function

July 31, 2009 by Annyce Davis

jQuery has done it again with a very succinct function to iterate over the values of a set and perform an action for each one. The each function is easy to use and keeps your code from being cluttered with many for loops.


var allAlts = new Array();
$('img').each(function(){
allAlts.push(this.alt);
});

These few lines of code will get the alt attribute of every image tag in your document and store it in an array.

More vi Commands

July 31, 2009 by Annyce Davis

Here are some more vi Commands that I have learned recently:

j – move down one line
k – move up one line
ndd – delete n number of characters

And apparently there are many, many more. To be continued…

Creating and Using Branches in Git

July 24, 2009 by Annyce Davis

Here are some basic work flows for working with the Git repository, especially the power of the branching features that Git offers.

To create a new branch and switch to that branch use:
$git checkout -b my_branch
Any changes that are done now will be reflected in the new branch and not the master.

To see what branch you are working on use:
$git branch
You should see an * beside the name of the branch that is current

To go back to our master branch use:
$git checkout master
Now any changes that are made will be reflected in the master branch but are not automatically populated to your new branch.

To merge our new branch into our master branch use:
$git merge my_branch
We do not need to specify where we are going to do the merge because we are already in the master branch.

To delete our new branch now that we have done a merge use:
$git branch -d my_branch

Another option for merging our branch into the master branch is the following:
$git checkout my_branch
$git rebase master
Fix any conflicts and do:
$git add
$git rebase –continue
$git checkout master
$git merge my_branch
This will make the history much cleaner.

« Previous Page
Next Page »

Follow Me

  • Bluesky

Categories

  • Android (61)
  • Career (5)
  • Communication (4)
  • Flutter (1)
  • Git (4)
  • Gradle (4)
  • Grails (23)
  • iOS (1)
  • Java (8)
  • JavaScript (6)
  • Kotlin (17)
  • Life (5)
  • Public Speaking (26)
  • Revenue (2)
  • RxJava (1)
  • Software Development (14)
  • Twitter (3)
  • Uncategorized (11)
  • Video Course (5)

Follow Me

  • Bluesky

Copyright © 2025 · All Rights Reserved · Log in