adhocshare Blog

0

SSH Auto completion on OSX

Something that is very much desired while working on shell. I love to have this feature of $ssh ser[TAB] Using brew is my preferred way, just type in – $brew install bash-completion Do not forget to add the text in...

0

HDFS disk consumption – Find what is taking hdfs space

Source: https://community.hortonworks.com/articles/16846/how-to-identify-what-is-consuming-space-in-hdfs.html Script #!/usr/bin/env bash max_depth=5 largest_root_dirs=$(hdfs dfs -du -s ‘/*’ | sort -nr | perl -ane ‘print “$F[1] “‘) printf “%15s %s\n” “bytes” “directory” for ld in $largest_root_dirs; do printf “%15.0f %s\n” $(hdfs dfs -du -s $ld| cut -d’ ‘...

0

WordPress – allow password protected content in search results

Source: https://wordpress.org/support/topic/how-to-allow-password-protected-content-in-search-results SOLUTION: Add this code to your functions.php file and you will get it to work. add_filter( ‘posts_search’, ‘include_password_posts_in_search’ ); function include_password_posts_in_search( $search ) { global $wpdb; $pattern = ” AND ({$wpdb->prefix}posts.post_password = ”)”; $search = str_replace( $pattern, ”,...

0

Use SSH Tunneling to access Ambari web UI, ResourceManager, JobHistory, NameNode, Oozie, and other web UI’s

Source: https://azure.microsoft.com/en-us/documentation/articles/hdinsight-linux-ambari-ssh-tunnel/ Original Author: Larry Franks Excerpts ssh tunnel command ssh -C2qTnNf -D 9876 user-name@machine-name This creates a connection that routes traffic to local port 9876 to the cluster over SSH. The options are: D 9876 – The local port that will route...

0

Disable THP on CentOS 6

For the impatient Disable Transparent Huge Pages on CentOS 6 During Runtime echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag   Surviving reboot sudo vi /etc/init.d/disable-transparent-hugepages #!/bin/sh ### BEGIN INIT INFO # Provides: disable-transparent-hugepages # Required-Start: $local_fs # Required-Stop: # X-Start-Before:...

0

Understanding HDFS Quotas and Hadoop Fs and Fsck Tools

Source: http://www.michael-noll.com/blog/2011/10/20/understanding-hdfs-quotas-and-hadoop-fs-and-fsck-tools/ References: http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsQuotaAdminGuide.html   In my experience Hadoop users often confuse the file size numbers reported by commands such as hadoop fsck, hadoop fs -dus and hadoop fs -count -q when it comes to reasoning about HDFS space quotas. Here is...

0

How to identify what is consuming space in HDFS

Source: https://community.hortonworks.com/articles/16846/how-to-identify-what-is-consuming-space-in-hdfs.html Find the directories using the most space in HDFS For a UI showing the biggest consumers of space in HDFS install and configure Twitter’s HDFS-DU. For a quick visual representation of HDFS disk usage with no extra tools required,...

0

Recommended Sony A6000 Settings

Source: https://photographylife.com/recommended-sony-a6000-settings We are continuing our series of recommended settings for cameras and this time we have the Sony A6000, an advanced interchangeable lens camera designed for enthusiasts and professionals. In this article, I want to provide some information on what...

0

How to Take Great Pictures with the Sony a6300 or a6000

Source: http://www.tomsguide.com/us/sony-a6300-user-guide,review-3429.html Credit: Samuel C. Rutherford / Tom’s Guide Two years after introducing the excellent Alpha 6000 (or a6000), Sony announced a more-powerful successor, the a6300. (Sony will continue to sell the a6000.) This mirrorless camera further closes the gap with...

0

iTerm2 shell integration scripts offline usage

At times we are working in an internet less environment. So, here are a few things we can do, Make the scripts available over a local http server Change scripts for any http://internet-address/ to http://local-address Making scripts available on local $...