Saturday, September 16, 2017

Adding Ctrl-Shift-Tab and Ctrl-Tab to Logitech Mouse buttons in Ubuntu

What was very helpful was setting up Ubuntu 16.10 to allow the "back" and "forward" buttons on my wireless Logitech mouse to map to Ctrl-Shift-Tab and Ctrl-Tab respectively, to more closely mimic a better workflow for navigating through massive web tabs.

1) Install needed libs in Ubuntu 16.10:
$ sudo apt-get install -y xbindkeys xautomation xev

2) Create xbindkeys rc file if not already created:
$ xbindkeys --defaults > ~/.xbindkeysrc

3) Append this to ~/.xbindkeysrc:
4) Re-run xbindkeys
$ kill $(ps aux | grep xbindkeys$ | awk '{print$2}');  xbindkeys


Information originally sourced from these links:
https://linux.die.net/man/1/xte
https://askubuntu.com/questions/152297/how-to-configure-extra-buttons-in-logitech-mouse

Monday, August 14, 2017

Enabling 1080p recording on Techsmith's Camtasia (Mac)

Sourced from: https://feedback.techsmith.com/techsmith/topics/1080p-recording


The webcam recording in Camtasia is factory-limited to 720p for performance reasons, but can be user-modified.  There are two preferences needed to implement the change, maxCameraWidthRecordingScreen and maxCameraWidthNotRecordingScreen.

To set the preferences, implement the following in a Mac Terminal:


$ defaults write com.techsmith.camtasia2.plist maxCameraWidthRecordingScreen -int 1920$ defaults write com.techsmith.camtasia2.plist maxCameraWidthNotRecordingScreen -int 1920
This should be done when Camtasia is not running.


NOTE regarding the Camtasia Application:
If you are running the non App Store build, the plist is 
~/Library/Preferences/com.techsmith.camtasia2.plist  .  

If you are running an App Store build, it is ~/Library/Containers/com.techsmith.camtasia2/Data/Library/Preferences/com.techsmith.camtasia2.plist .

Thursday, June 1, 2017

Allow .mp4 files to be streamable on simple Apache Webserver


Sourced from http://blog.servergrove.com/2012/04/18/configuring-your-apache-web-server-for-html5-video-formats/

To ensure that a simple Apache Webserver is able to stream video, ensure to add the following to the .htaccess file:

AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm

Tuesday, March 28, 2017

Uncompress file to HDFS without unzipping on local FS

Sourced from: http://bigdatanoob.blogspot.com/2011/07/copy-and-uncompress-file-to-hdfs.html


Quick and dirty method to be able to uncompress a large file directly into HDFS without having to uncompress locally:

Syntax:
       $ gunzip -c localfile.gz | hadoop fs -put - /user/user1/localfile


Explanation of options:
       gunzip -c  = The -c option causes the output of the gunzip operation to be written to the
       console.

       The '-' specified in the hadoop fs -put operation points the source file to be originated
       from the console.


So with this example:
       $ gunzip -c 3GB_json.gz | hadoop fs -put - /user/cloudera/3GB_json

The shell will run gunzip using the a compressed 3GB Json file (3GB_json.gz) sending its output to the console, which is then piped into the hadoop fs -put operation, which will then place the payload into the file /user/cloudera/3GB_json.







Friday, November 4, 2016

Quick and Dirty Web Service (to serve Parcels and Packages) from a Mac

The following command can be run from a Mac to allow service to run a simple Web server to allow connectivity to access the files located on /path/to/parcels.  Very useful for spinning up a quick CM/CDH repro cluster and needing to post a repo to host CM/CDH/Other parcels.  

$ cd /path/to/parcels; ifconfig | grep inet; sudo python -m SimpleHTTPServer 80

(Originally sourced from: http://lifehacker.com/start-a-simple-web-server-from-any-directory-on-your-ma-496425450, modified to fit this use-case)


The breakdown of the above command:
1) Change dir to the specified location to share/make available
2) Report all of the available network interfaces and display their IP address
3) Run the python package for SimpleHTTPServer on port 80.

Thursday, September 29, 2016

Quickly update user password in an automated fashion


 Helpful when updating a user password in a script for small test clusters:

$  ssh remoteserver 'useradd newuser;  $PASSWD_COMMAND'

where $PASSWD_COMMAND  is one of the following:

    echo -e "newpassword\newpassword" | passwd newuser

    echo "newuser:newpassword" | chpasswd


    echo "newpassword" | passwd --stdin newuser

Saturday, September 17, 2016

Install Mac OSX El Capitan to a USB stick via CLI


On the command line, copy and paste the following.  NOTE: Substitute the path of the actual USB stick in place of  /Volumes/:

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/ --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app


Sourced from:
http://www.macworld.com/article/2981585/operating-systems/how-to-make-a-bootable-os-x-10-11-el-capitan-installer-drive.html