Change hostname Change hostname $ sudo scutil –-set HostName <new hostname> Related posts: Super charge bash with these bash_profile tips SSH Auto completion on OSX Can’t connect Excel to Hive using ODBC driver on MAC brew packages and...
Objective Have a common place on local system to store all repositories. Work on any project from anywhere on local system and keep the updates (repo push) synced to common place. We can then make google drive to backup the common repository...
References https://www.garron.me/en/articles/git-linux-mac-private-server.html https://coderwall.com/p/9lzkww/setting-up-a-git-daemon-on-mac-os-x Simple Git server – https://itunes.apple.com/us/app/simple-git-server/id1040403936?mt=12 https://github.com/bard/sameplace/wiki/Getting-started-with-git Related posts: A nice .vimrc A Secure HDFS Client Example Hadoop Hive UDTF Tutorial – Extending Apache Hive with Table Functions Parsing XML using JAXB in Java
Process Objective is to create Java class files that represent schema from the XML data. Create XSD from XML Generators: http://www.freeformatter.com/xsd-generator.html, http://xmlgrid.net/xml2xsd.html, https://devutilsonline.com/xsd-xml/generate-xsd-from-xml Use xjc on XSD to create JAXB Java classes $xjc sample.xsd Creates a generated/ folder in the same...
Source: http://geekexplains.blogspot.com/2009/04/sax-vs-dom-differences-between-dom-and.html Differences between DOM and SAX. When to use what? Before going through the differences, if you need a refresh of what SAX and DOM are, please refer to this article – SAX, DOM, JAXP, & JDOM >>. While comparing...
AWK syntax: awk [-Fs] “program” [file1 file2…] # commands come from DOS cmdline awk ‘program{print “foo”}’ file1 # single quotes around double quotes # NB: Don’t use single quotes alone if the embedded info will contain the # vertical bar...
Chart of similar operations with sed and awk ——————————————– string ====== sed “s/from/to/” awk ‘{sub(“from”,”to”); print}’ sed “s/from/to/g” awk ‘{gsub(“from”,”to”); print}’ sed “s/from/to/3” awk ‘{$0=gensub(“from”,”to”,3); print}’ regex ===== sed “s/reg.*$/_&_/” awk ‘{sub(/reg.*$/, “_&_”); print}’ sed “s/reg[ex]/YY/g” awk ‘{gsub(/reg[ex]/, “YY”); print}’...
HANDY ONE-LINE SCRIPTS FOR AWK 30 April 2008 Compiled by Eric Pement – eric [at] pement.org version 0.27 Latest version of this file (in English) is usually at: http://www.pement.org/awk/awk1line.txt This file will also be available in other languages: Chinese -...
————————————————————————- HANDY ONE-LINERS FOR AWK (Unix stream editor) Apr. 17, 2001 compiled by Eric Pement <[email protected]> version 0.1 Latest version of this file is usually at: http://www.student.northpark.edu/pemente/awk/awk1line.txt USAGE: Unix: awk ‘/pattern/ {print “$1”}’ # standard Unix shells DOS/Win: awk ‘/pattern/...