adhocshare Blog

0

TextWrangler Text Filter collection

Location  ~/Library/Application Support/TextWrangler/Text Filters Tidy HTML.sh #!/bin/sh # run “tidy” on the file given as 1st (and only) parameter. # /usr/bin/tidy -utf8 -asxhtml -indent -wrap 100 -quiet 2> /dev/null Tidy XML.sh #!/bin/sh XMLLINT_INDENT=$” ” xmllint –format –encode utf-8 – Tidy JSON.py...

0

Lookup YARN Acls capacity scheduler queue users from /etc/passwd

Following is an awk script that I use in TextWrangler as a Text Filter. This script generates the required awk and grep commands to lookup /etc/passwd file. #!/bin/sh # gawk ‘{match($0,”([a-zA-Z]+).acl_submit_applications=(.*)”,a); if(a[1] != “”) print a[1] “\t” a[2] }’ #...

0

A Secure HDFS Client Example

Source: http://henning.kropponline.de/2016/02/14/a-secure-hdfs-client-example/ It takes about 3 lines of Java code to write a simple HDFS client that can further be used to upload, read or list files. Here is an example: Configuration conf = new Configuration(); conf.set(“fs.defaultFS”,”hdfs://one.hdp:8020″); FileSystem fs = FileSystem.get(conf);...

0

Create ISO on Mac – the easy way

Create an ISO on Mac from a folder $ hdiutil makehybrid -o ~/Desktop/image.iso ~/path/to/folder/to/be/converted -iso -joliet     Related posts: Transparent image file on MAC MAC terminal shortcut keys How-to: Install Hue on a Mac Lync for Mac removal script

0

Arc Is a Gorgeous GTK Theme for Linux Desktops

Source: http://www.omgubuntu.co.uk/2015/06/arc-gtk-theme   It has been a veritable eon since we last highlighted a GTK theme here on this site. But seeing Arc, pictured above, rectifies that. We couldn’t not mention it.  Arc GTK Theme Arc is a flat theme with a subtle color scheme and...

0

Creating JAR with dependencies using maven (eclipse, others)

Source: http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven   Inside pom.xml use the following XML code <?xml version=”1.0″ encoding=”utf-8″?> <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>fully.qualified.MainClass</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </plugin> </plugins> </build>     To build the JAR use the following command...

0

Virtualbox Linux Guest display auto size non functioning

So you have setup Virtualbox guest additions on Linux (Mine was Linux mint 17.2) guest and the window size is not honored.. Did you change the display resolution manually? If so, you will now need to remove the monitor settings...

0

Add Graphical User Interface (GNOME) to a CentOS Minimal Install

Impatient? follow through 😉 Install Desktop Packages # yum -y groupinstall “Desktop” “Desktop Platform” “X Window System” “Fonts” Optional GUI packages # yum -y groupinstall “Graphical Administration Tools” # yum -y groupinstall “Internet Browser” # yum -y groupinstall “General Purpose...

0

No network connection on Windows XP guest – VirtualBox

Problem due to no network driver for the Ethernet hardware.   References https://forums.virtualbox.org/viewtopic.php?f=11&t=16616 https://www.google.com/search?q=PRO2KXP.exe&ie=utf-8&oe=utf-8 https://downloadcenter.intel.com/download/8659/LAN-Intel-PRO-Network-Connections-LAN-Driver https://downloadcenter.intel.com/downloads/eula/8659/LAN-Intel-PRO-Network-Connections-LAN-Driver?httpDown=https%3A%2F%2Fdownloadmirror.intel.com%2F8659%2Feng%2FPRO2KXP.exe   Related posts: Virtualbox Linux Guest display auto size non functioning Host-Only Networking With VirtualBox Download m3u8 URL video to local Shrinking VirtualBox VDI...

0

VirtualBox – Effective UID is not root. Please try reinstalling VirtualBox.

References http://superuser.com/questions/620936/virtualbox-does-not-start-on-mac-os-x   Only working solution on El Capitan after upgrading to VirtualBox v5, was $ for bin in VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT VBoxHeadless; do     sudo chmod u+s “/Applications/VirtualBox.app/Contents/MacOS/${bin}”; done       No related posts.