Instagram Launches Instagram Direct

Instagram Direct Launches December 2013 One To One Private Photos CommunicationInstagram is adding Instagram Direct, the ability to send images to users, instead of broadcasting your photos publicly.

The photo-sharing network’s CEO Kevin Systrom reiterated that Instagram is not about photography, but about communication.

“If we were about photography, we’d be built into cameras,” he said at a press conference in New York on Thursday. “But, we’re not built into cameras. We’re built into phones.”

Users will be able to send photos or videos directly up to 15 people at a time. To share the image privately, use the one-to-one button at the bottom of the screen. You’ll be able to tell when the person has seen the photo by showing you a checkmark, similar to how Facebook messaging alerts you that someone has seen your message.

You can only get these direct images from people you follow, otherwise you will get a message in a “pending requests” area.

The new feature is available on both iOS and Android.

Windows Batch Code: Determine if a String is in the Path Variable and Execute or Download the Missing Software From A Website

This code section below was very helpful when writing a quick Windows batch file to determine if a piece of software was available at a Windows Command Prompt or Powershell by checking the Path environment variable for a keyword.  In the case below, we check to see if NodeJS is installed, and if it is we execute.  Otherwise, we queue a download of NodeJS MSI installation to Windows Temp Directory and then kick off the installation!

 

Windows Batch Code

SET VWF_DIR=%VWF_DIR%

REM Check to see if Node is installed and accessible from the Path variable

set test=c:\program files (x86)\nodejs

call:inPath test

REM If it is, we start up the NodeJS Server. The NodeJS server accepts command line parameters.
REM C:\> vwf –help will display all of the currently available parameters accepted by Virtual World Framework

IF NOT ERRORLEVEL 1 pushd %VWF_DIR% && cmd.exe /C npm install && popd && cmd.exe /C node “%VWF_DIR%/node-server.js” %*
IF ERRORLEVEL 1 set test=c:\program files\nodejs && call:inPath test
IF ERRORLEVEL 1 bitsadmin.exe /transfer “NodeJS is not installed. We are downloading NodeJS for you.” http://nodejs.org/dist/v0.10.22/x64/node-v0.10.22-x64.msi C:\windows\temp\node-v0.10.22-x64.msi & call C:\windows\temp\node-v0.10.22-x64.msi & echo Node is now installed. You will need to restart your computer and execute VWF again to start your server.
endlocal

:inPath pathVar
::
:: Tests if the path stored within variable pathVar exists within PATH.
::
:: The result is returned as the ERRORLEVEL:
:: 0 if the pathVar path is found in PATH.
:: 1 if the pathVar path is not found in PATH.
:: 2 if pathVar is missing or undefined or if PATH is undefined.
::
:: If the pathVar path is fully qualified, then it is logically compared
:: to each fully qualified path within PATH. The path strings don’t have
:: to match exactly, they just need to be logically equivalent.
::
:: If the pathVar path is relative, then it is strictly compared to each
:: relative path within PATH. Case differences and double quotes are
:: ignored, but otherwise the path strings must match exactly.
::
::————————————————————————
::
:: Error checking
if “%~1″==”” exit /b 2
if not defined %~1 exit /b 2
if not defined path exit /b 2
::
:: Prepare to safely parse PATH into individual paths
setlocal DisableDelayedExpansion
set “var=%path:”=””%”
set “var=%var:^=^^%”
set “var=%var:&=^&%”
set “var=%var:|=^|%”
set “var=%var:<=^<%”
set “var=%var:>=^>%”
set “var=%var:;=^;^;%”
set var=%var:””=”%
set “var=%var:”=””Q%”
set “var=%var:;;=”S”S%”
set “var=%var:^;^;=;%”
set “var=%var:””=”%”
setlocal EnableDelayedExpansion
set “var=!var:”Q=!”
set “var=!var:”S”S=”;”!”
::
:: Remove quotes from pathVar and abort if it becomes empty
set “new=!%~1:”=!”
if not defined new exit /b 2
::
:: Determine if pathVar is fully qualified
echo(“!new!”|findstr /i /r /c:^”^^\”[a-zA-Z]:[\\/][^\\/]” ^
/c:^”^^\”[\\][\\]” >nul ^
&& set “abs=1” || set “abs=0”
::
:: For each path in PATH, check if path is fully qualified and then do
:: proper comparison with pathVar.
:: Exit with ERRORLEVEL 0 if a match is found.
:: Delayed expansion must be disabled when expanding FOR variables
:: just in case the value contains !
for %%A in (“!new!\”) do for %%B in (“!var!”) do (
if “!!”==”” endlocal
for %%C in (“%%~B\”) do (
echo(%%B|findstr /i /r /c:^”^^\”[a-zA-Z]:[\\/][^\\/]” ^
/c:^”^^\”[\\][\\]” >nul ^
&& (if %abs%==1 if /i “%%~sA”==”%%~sC” exit /b 0) ^
|| (if %abs%==0 if /i “%%~A”==”%%~C” exit /b 0)
)
)
:: No match was found so exit with ERRORLEVEL 1
exit /b 1

Using GitHub Branch Names With Forward Slashes and Jenkins Together

One of my pet peeves with Jenkins existed around the use of forward slashes in our branch names on Virtual World Framework.  While the forward slash “/” was accepted by GitHub (ie. branch/branch-name) as an acceptable character, Jenkins would blow up when trying to pull from this branch name structure.

The solution for using forward-slashes branch names in Jenkins was incredible easy however. You simply need to add origin/ to the beginning of your branch name when filling in the “branches to build” Branch Specifier.

Thus:

origin/branch/branch-name 

allows Jenkins to poll and pull changes specific to a branch with a forward slash in its name.  Simple!

2014 New Year’s Resolutions For A Better Life

start_button2

2013 is coming to a close, and this year has had a lot of ups and downs for my personal life.  At Lockheed, we sit down and brainstorm on things to start/stop/continue for our future growth every year.  Sitting back to reflect, I have come up with a list of things to stop from 2013, which should lead to a great start in 2014.  I am not big on setting resolutions, so instead I consider these life lessons to integrate into my psyche for a more positive and successful year!

  1. Stop running from my problems. 
  2. Stop lying to myself.
  3. Stop putting my own needs on the back burner.
  4. Stop trying to hold onto the past.
  5. Stop berating myself for old mistakes.
  6. Stop exclusively looking to others for happiness.
  7. Stop being idle.
  8. Stop thinking I’m not ready.
  9. Stop getting involved in relationships for the wrong reasons.
  10. Stop rejecting new relationships just because old ones didn’t work.
  11. Stop trying to compete against everyone else.
  12. Stop being jealous of others.
  13. Stop complaining and feeling sorry for myself.
  14. Stop holding grudges.
  15. Stop wasting time explaining myself to others.
  16. Stop doing the same things over and over.
  17. Stop overlooking the beauty of small moments.
  18. Stop following the path of least resistance.
  19. Stop acting like everything is fine if it isn’t.
  20. Stop trying to be everything to everyone.
  21. Stop worrying so much.

 

Not all was bad habits though.  Personal growth is a continual challenge, and 2013 gave me some great new habits that I would like to continue including:

  1. Continue being grateful for the life I have built.
  2. Continue owning my mistakes when I make them, and work to correct them.
  3. Continue to realize perfection is an illusion – happiness does not spring from perfection.
  4. Continue to be quietly strong when confronted by people who are trying to bring you down by projecting their own issues on you.
  5. Continue to forgive others, and understand they are usually from a place of internal pain.
  6. Continue to not be scared to make mistakes. Mistakes are the part of life that grow your soul’s strength.
  7. Continue to realize I am not anyone else.
  8. Continue investing energy in people that elevate my life to a higher level.
  9. Continue focusing on my health.
  10. Continue being a change agent for my life, and for my community.

And of course, you need to challenge yourself, otherwise you will stagnate.  So here are some new challenges for 2014 that I want to personally attain and integrate into my being:

  1. Start focusing on participating in activities that make me happy.
  2. Start breaking unhealthy routines in my life.
  3. Start realizing that the moments during a year that seem to be the end are just a new beginning.
  4. Start having fun each and every single day.

WATCH: Photorealistic Morgan Freeman Drawn on an iPad

This just absolutely blows my mind that it was done on an iPad. You can watch the entire image be created from beginning to end.  I still can’t fathom how this was made on an iPad even as I watch it with my very own eyes.  This is why I love to develop software – you never know WHAT an artist can do with the tools you create for them.

How To Let Go Of Your Past To Bring About Your Future

Too often I talk to people that have become complacent, have built up their walls, and have become so jaded that they forget the magic and mystery of the world around them.  They forget that 150 years ago, man did not fly, radios did not exist, television did not exist, and we rubbed radium on our teeth as a way to make them glow for fashion.  We live in such a technologically advanced world today that the magic of how it all works has become mundane.  I challenge everyone that has become complacent in their now to embrace and contemplate the world around them that joins the beauty of the natural night sky above with a weave of information that unites every human being on this planet.  There is so much to be amazed by – embrace that joy your soul feels when you realize how truly astounding it is, and challenge yourself to change your thoughts and your habits today to reach a better, more successful future for yourself and for those around you tomorrow.

I challenge you to change your attitude through small actions:

  1. Compliment one person every day.
  2. Turn off the television.
  3. For every negative thought you have and catch, think a positive thought about how you can affect change to make this negative disappear from your reality.
  4. Meditate for one full minute at least once a day.
  5. Name three things every day you are thankful for.
  6. Do ten pushups every time you feel yourself getting anxious.
  7. Read 5 pages of a novel daily – let your mind take a mental vacation.
  8. Go outside and walk 100 steps.  Observe the world around you, and breathe deeply.
  9. Drink one glass of water in silence of both your voice and your mind.

Once you start on these small things, you will find that the calmness and peace of mind that arises within you will help you challenge your anxiety for the future, reduce your stress for the present, and allow you to let go of the past.  Once you do, you will normally find that today’s mountains are really mole hills.

Virtual World Framework and HAProxy 1.5 How To Setup Configuration

When setting up our operational environment on Amazon Web Services, we had a number of interesting constraints.

  • We were cost constrained to maintain the minimum number of servers possible.
  • We needed to support Jenkins for Continuous Integration and Redmine for Issue Tracking.
  • The VWF demonstrations utilize websockets and secure websockets which required us to support websockets / secure websockets.
  • We needed to support multiple subdomains which point to multiple Ruby Thin web servers/ Node.js web servers on the back-end to host our executing branch configurations from GitHub.
  • We needed to allow an SSL pathway for internal Lockheed network engineers to access.
  • We required compression
  • We required all traffic over port 80
  • We needed to reroute a subdomain to point to an sh script for installation hosted on GitHub

To solve these issues, HAProxy came in to save the day allowing us to achieve all of these goals by serving as our front-end service proxy for our operational environment to handle incoming client requests.  HAProxy 1.5, although still in development, is stable enough and capable of handling reverse proxying of websockets for HTML5 AND handles compression on the fly as well.

Below is our configuration file.  Please leave questions in the comments if you have any!

HAProxy Configuration for Virtual World Framework

————————————————————————————————–

global

log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 4096
#chroot /usr/share/haproxy
user haproxy
group haproxy
daemon
debug
#quiet

defaults

log global
mode http
option httplog
option http-server-close
option dontlognull
retries 3
option redispatch
option contstats
option forwardfor
stats enable
stats refresh 10s
stats uri /stats
compression algo gzip
compression type text/html text/plain text/css model/vnd.collada+xml application/javascript
timeout connect 360s
timeout client 360s
timeout server 180s
timeout http-keep-alive 60s
timeout http-request 60s
timeout queue 60s
timeout tarpit 60s
timeout tunnel 3600s

frontend public

bind *:80
acl is_jenkins hdr_beg(host) -i jenkins.
acl is_redmine hdr_beg(host) -i redmine.
acl is_www hdr_beg(host) -i www.
acl is_integration hdr_beg(host) -i integration.
acl is_development hdr_beg(host) -i development.
acl is_download hdr_beg(host) -i download.
acl is_test hdr_beg(host) -i test.
acl is_get hdr_beg(host) -t get.
use_backend jenkins if is_jenkins
use_backend redmine if is_redmine
use_backend development if is_development
use_backend integration if is_integration
use_backend download if is_download
use_backend www if is_www
use_backend test if is_test
use_backend get if is_get
default_backend www

backend www

timeout server 30s
server www1 127.0.0.1:5000
acl hdr_connection_upgrade hdr(Connection) -i upgrade
acl hdr_upgrade_websocket hdr(Upgrade) -i websocket
acl hdr_websocket_key hdr_cnt(Sec-WebSocket-Key) eq 1
acl hdr_websocket_version hdr_cnt(Sec-WebSocket-Version) eq 1
acl hdr_host hdr_cnt(Sec-WebSocket-Version) eq 1

backend integration

timeout server 30s
server integration1 127.0.0.1:5001
acl hdr_connection_upgrade hdr(Connection) -i upgrade
acl hdr_upgrade_websocket hdr(Upgrade) -i websocket
acl hdr_websocket_key hdr_cnt(Sec-WebSocket-Key) eq 1
acl hdr_websocket_version hdr_cnt(Sec-WebSocket-Version) eq 1
acl hdr_host hdr_cnt(Sec-WebSocket-Version) eq 1

backend development

timeout server 30s
server integration1 127.0.0.1:5002
acl hdr_connection_upgrade hdr(Connection) -i upgrade
acl hdr_upgrade_websocket hdr(Upgrade) -i websocket
acl hdr_websocket_key hdr_cnt(Sec-WebSocket-Key) eq 1
acl hdr_websocket_version hdr_cnt(Sec-WebSocket-Version) eq 1
acl hdr_host hdr_cnt(Sec-WebSocket-Version) eq 1

backend test

timeout server 30s
server integration1 127.0.0.1:5003
acl hdr_connection_upgrade hdr(Connection) -i upgrade
acl hdr_upgrade_websocket hdr(Upgrade) -i websocket
acl hdr_websocket_key hdr_cnt(Sec-WebSocket-Key) eq 1
acl hdr_websocket_version hdr_cnt(Sec-WebSocket-Version) eq 1
acl hdr_host hdr_cnt(Sec-WebSocket-Version) eq 1

backend jenkins

timeout server 30s
server jenkins1 127.0.0.1:6001
option http-server-close
cookie JSESSIONID prefix

backend redmine

timeout server 180s
server redmine1 127.0.0.1:6000
option http-server-close
cookie JSESSIONID prefix

backend download

timeout server 180s
server download1 127.0.0.1:8081
option http-server-close
cookie JSESSIONID prefix

backend get

redirect location https://raw.github.com/virtual-world-framework/vwf/branch/vwf-install-scripts/support/build/Scripts/install.sh