Working on OS Commerce

  1. Created web_store git report on kfserver01.
  2. Populated “master” with Gold version of code from 04/04/2011.
  3. Branched to “dev” and populated with code from 01/01/2012.
  4. Merged that to master
  5. checked 01/01/2013 and 01/01/2014, there were no changes.
  6. Brought in 03/03/2014 to dev branch. Two files changed.
Jays-MacBook-Pro:web-store jeverson$ git status
 # On branch dev
 # Changes not staged for commit:
 # (use "git add ..." to update what will be committed)
 # (use "git checkout -- ..." to discard changes in working directory)
 #
 # modified: lim_admin/.htpasswd_oscommerce
 # modified: lim_admin/includes/configure.php
 #
 no changes added to commit (use "git add" and/or "git commit -a")
 Jays-MacBook-Pro:web-store jeverson$ pwd
 /Users/jeverson/source/web-store

Need to compare files next. Admin interface should be fixed with new “secure105…” URL, I think.

Posted in Journal, LiM | Tagged , | 1 Comment

Linux: How to Identify 32bit vs. 64bit

For the CPU:

Using lscpu:

64bit

$ lscpu | grep op-mode
CPU op-mode(s): 32-bit, 64-bit

32bit

$ lscpu | grep op-mode
CPU op-mode(s):        32-bit

or check /proc/cpuinfo for the tm/lm flags. If lm exists it supports 64bit. If only tm exists, it only supports 32bit.

64bit

$ grep -w lm /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority

32bit

$ grep -w lm /proc/cpuinfo
$ grep -w tm /proc/cpuinfo
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts aperfmperf pni monitor vmx est tm2 xtpr pdcm dtherm
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts aperfmperf pni monitor vmx est tm2 xtpr pdcm dtherm

For the O/S:

The architecture should be listed as x86_64 for 64bit or i686 for 32bit.

Using uname (-m or -p):

64bit

$ uname -m
x86_64
$ uname -p
x86_64

32bit

$ uname -m
i686
$ uname -p
i686

or using lscpu:

64bit

$ lscpu | grep -i arch
Architecture:          x86_64

32bit

$ lscpu | grep -i arch
Architecture:          i686

or using getconf:

64bit

$ getconf LONG_BIT
64

32bit

$ getconf LONG_BIT
32
Posted in System Configuration | Tagged | Comments Off on Linux: How to Identify 32bit vs. 64bit

Rollback a File Using Git

  1. Determine the version of the file (.git-include is used in this example) that is needed
    $ git lds .git-include
    76b7faf 2014-03-19 (HEAD, origin/master, origin/HEAD, master) added aliases lds ld and le to git-include file [Jay Everson (Macbook)]
    e729205 2014-03-19 Added cool aliases to .git-Include, found one the web [Jay Everson (Macbook)]
    56375a9 2014-02-01 Adding git include [Jay Everson (VM)]
  2. Checkout that version
    git checkout 56375a9 .git-include

Note: “lds” is an alias that is defined as:

lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short

It is just a pretty implementation of the log command.

If there is a need to undo the rollback use:

git checkout -- .git-include
Posted in git | Comments Off on Rollback a File Using Git

Setting up a local Git using a remote server

  1. Install git
    sudo apt-get install git
  2. Configure git
    git config --global user.name "Jay Everson (hostname-O/S)"
    git config --global user.email jeverson@techmentor.com
  3. Setup SSH client to use port 2222
    # vi ~/.ssh/config
    Host backwater.techmentor.com
        port 2222
  4. Setup SSH to login to the “origin” server without a password.
  5. Create source directory
  6. Clone Repos
    git clone gitpriv@backwater.techmentor.com:gitrepo/scripts.git
    git clone gitpriv@backwater.techmentor.com:gitrepo/configs.git
    git clone gitpriv@backwater.techmentor.com:gitrepo/java.git
    
Posted in git, Journal | Comments Off on Setting up a local Git using a remote server

Set Timezone in Raspbian

Run

sudo dpkg-reconfigure tzdata
Posted in System Configuration | Tagged , | Comments Off on Set Timezone in Raspbian

eNews Theme: Replace Post Thumbnail

In single.php replace:

$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"];
if($thumb <> '') { ?>
    <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>

with

<!-- Modification 3/6/14 to display thumbnail from custom field -->
		  $myThumb = get_post_meta($post->ID, 'Thumbnail', true);
		  if($myThumb <> '') { ?>
		  	<img src="<?php print($myThumb) ?>" class='thumbnail alignleft'  alt='GitHub Developer Program Emphasizes Integrations' width='172' height='172' /> 
			
		 <?php } else { 
		  	$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
		  	$thumb = $thumbnail["thumb"];
		  	if($thumb <> '') { ?>
			    <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
		<?php }; ?> 
<!-- End Modification -->
Posted in Wordpress | Tagged , | Comments Off on eNews Theme: Replace Post Thumbnail

How to re-enable the Apple-provided Java SE 6 web plug-in and Web Start functionality.

If, after installing Java for OS X 2013-005 and the latest version of Java 7 from Oracle, you want to disable Java 7 and re-enable the Apple-provided Java SE 6 web plug-in and Web Start functionality, follow these steps.

Note: You must be logged in as an administrator. If prompted for your administrator password after a command, enter it and then press the Return or Enter key.

  1. Open Terminal, located in the Utilities folder.
  2. Enter this command, then press the Return or Enter key:
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
  3. Enter this command, then press the Return or Enter key:
    sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled
  4. Enter this command, then press the Return or Enter key:
    sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
  5. To re-enable Java SE 6 Web Start, enter this command, then press the Return or Enter key:
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws

Additional Information

The following steps will undo the above commands and restore Java 7 in Lion and Mountain Lion.

  1. Disable Java SE 6 Web Start opening:
      • Enter this command, then press the Return or Enter key:
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javaws /usr/bin/javaws
    • When prompted, enter your administrator password, then press the Return or Enter key.
  2. Re-enable the Java 7 applet plug-in by downloading and reinstalling the latest version of Oracle Java 7 JRE.
Posted in Knowledge Forum, LiM | Tagged , , | Comments Off on How to re-enable the Apple-provided Java SE 6 web plug-in and Web Start functionality.

Basic Theme: Added Image Behind Menu

Added following code to Custom CSS:

#pagesback { width:970px; margin: 10px auto 0px auto; height: 39px; }

Then, added the following to header.php, just before Navigation Bar code:

<div id="pagesback"><img src="http://sysadmin.techmentor.com/wp-content/uploads/2014/03/Banner03.png">
</div>
Posted in Wordpress | Tagged , , , | Comments Off on Basic Theme: Added Image Behind Menu

Basic Theme: Added Leaderboard Ad

Added the following code to header.php:

<div id="leaderboard"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- SA-LeaderBoard -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-1786161350237793"
     data-ad-slot="8804002359"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>></div>

Then, added the following code to Custom CSS:

#leaderboard { width:728px; margin: 10px auto 0px auto; height: 90px; }
Posted in Wordpress | Tagged , , , , | Comments Off on Basic Theme: Added Leaderboard Ad

Nexus Theme: Widen Widget Sidebar

Needed to widen the widget sidebar to fit a 300px wide AdSense ad. Added the following code to Custom CSS:

#sidebar .widgettitle {
margin: 0 -10px 20px -10px;
}

#sidebar .widget {
padding: 0 10px 10px;
}
Posted in Wordpress | Tagged , , , , | Comments Off on Nexus Theme: Widen Widget Sidebar