Running elastic # (see Elastic search and Kibana - getting started)
Use case: building a employee directory for Megacorp
each document - type of ’employee' everything in megacorp index Populating # # Delete the `megacorp` index in case it already exists DELETE /megacorp # Index document 1, type "employee", in the # "megacorp" index PUT /megacorp/employee/1 { "first_name" : "John", "last_name" : "Smith", "age" : 25, "about" : "I love to go rock climbing", "interests": [ "sports", "music" ] } # Index two more documents PUT /megacorp/employee/2 { "first_name" : "Jane", "last_name" : "Smith", "age" : 32, "about" : "I like to collect rock albums", "interests": [ "music" ] } PUT /megacorp/employee/3 { "first_name" : "Douglas", "last_name" : "Fir", "age" : 35, "about": "I like to build cabinets", "interests": [ "forestry" ] } In server
Java approach # Use the real time search with this JAR - https://jarscan.com/
➜ scripts git:(authoring) ✗ java -jar ~/bin/jarscan.jar ========================= JarScan written by Geoff Yaworski gyaworski@hotmail.com Version 2.0 ========================= Usage: java -jar jarscan.jar [-help | /?] [-dir directory name] [-zip] [-showProgress] <-files | -class | -package> <search string 1> [search string 2] [search string n] Help: -help or /? Displays this message. -dir The directory to start searching from default is "." -zip Also search Zip files -showProgress Show a running count of files read in -files or -class Search for a file or Java class contained in some library. i.e. HttpServlet -package Search for a Java package contained in some library. i.e. javax.servlet.http search string The file or package to search for. i.e. see examples above example
As part of “back to basics” software minimalism movement, I have exported the old Wordpress blog and loaded it into Jekyll with intention to publish it on my Github
This contains almost 10 years worth of history of my posts, plus few not yet previously unpublished posts.
It is based on Jekyll Clean theme, created by Scott Emmons - see it / get it from github.
If you are interested in the Jekyll Clean theme:
Got it working. It is a bit rough around the edges, but functional.
The two components
http://localhost:8080/dyn/admin/nucleus/thinkwrap/twatg/script/GroovyDemoScript/ http://localhost:8080/dyn/admin/nucleus/thinkwrap/twatg/script/GroovyScriptRunner/ The are not started via Initial, but that is not a problem.
The script tested:
class ThatsGroovyDude implements com.thinkwrap.twatg.script.RunnableScript { atg.nucleus.Nucleus nuc = atg.nucleus.Nucleus.getGlobalNucleus(); public String run() { String s = ""; nuc.configPathNames.each { s += "${it}\n" } return "Hello World!\n\n" + s; } }
Move the location of the screenshots # I do not want to have ~/Desktop polluted with files. Thus
mkdir -p ~/Documents/Screenshots defaults write com.apple.screencapture location ~/Documents/Screenshots killall SystemUIServer Test the screenshot - it does it
Automator based auto-rename # Create Folder action for ~/Documents/Screenshots
How to install Chrome in Centos 6.5 # Step 1. Add Google Yum Repository # Create a new yum repository using below instructions.
sudo vim /etc/yum.repos.d/google.repo
Add following content to this file
[google] name=Google baseurl=http://dl.google.com/linux/rpm/stable/$basearch enabled=1 gpgcheck=1 gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub Step 2: Install/Update Google Chrome # Richard Lloid provided an shell script to grab libraries from a more recent Linux distro, put them in a tree (/opt/google/chrome/lib) exclusively picked up by Google Chrome and then you can indeed run Google Chrome on CentOS 6.4 or later. Read More
This documents how to enforce the Gitolite permission to make LIVE branch writeable only by team leads
How gitolite works # Repository permission structure # This is general format of repo definition
REPO NAME rule line rule line for example
@staff = dilbert alice wally bob repo foo RW+ = dilbert # line 1 RW+ dev = alice # line 2 - = wally # line 3 RW temp/ = @staff # line 4 R = ashok # line 5 The Rule line has format:
Installation of sshfs in the new VM # On Centos 6, the fuse-sshfs is not part of default YUM repos.
Get the ’epel’ repos # wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm Validate
$ ls -1 /etc/yum.repos.d/epel* /etc/yum.repos.d/remi.repo /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/remi.repo It if good idea to enable the remi by default
I started to see this message in some of my Git environments
Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the default changes, use: git config --global push.default matching To squelch this message and adopt the new behavior now, use: git config --global push.default simple This is collection of information gathered from Stackoverflow, Git docs and various internet sources. Putting it together so that I do not have to google it again.