$ sudo yum install ncurses-devel
$ cd /usr/local/src
$ sudo curl -L http://sourceforge.net/projects/zsh/files/zsh/5.0.7/zsh-5.0.7.tar.gz/download -o zsh-5.0.7.tar.gz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### | |
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget. | |
### You can download all the binaries one-shot by just giving the BASE_URL. | |
### Script might be useful if you need Oracle JDK on Amazon EC2 env. | |
### Script is updated for every JDK release. | |
### Features:- | |
# 1. Resumes a broken / interrupted [previous] download, if any. | |
# 2. Renames the file to a proper name with including platform info. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console) | |
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle" | |
Install a bundle | |
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F | |
bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles | |
Build a bundle | |
curl -u admin:admin -F bundleHome=/apps/centrica/bundles/name of bundle -F | |
descriptor=/apps/centrica/bundles/com.centrica.cq.wcm.core-bundle/name_of_bundle.bnd |
- How to Rebuild a Pre-Existing AEM+Mongo Cluster
- or migrate from Tar to MongoDB or MongoDB to Tar"
- or migrate from 5.6.1 or 6.x to 6.x via data migration instead of jar upgrade
- (Mongo to Mongo only) Remove one replica from the replica set and delete/recreate the db
- Remove the replica node from the set: http://docs.mongodb.org/master/tutorial/remove-replica-set-member/
- Validate that no other nodes in the set consider that node to be part of the set anymore. Log into each node in the cluster via mongo shell and run rs.status() to validate that the node that was taken out is not in the cluster any longer.
- Drop the aem database on that node http://docs.mongodb.org/manual/reference/command/dropDatabase/
- Re-add the database with the correct user permissions (do not add the mongo instance back to the replica set)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Non-root account is recommended for this process | |
# centos-specific prepration | |
sudo yum -y update && sudo yum -y groupinstall 'Development Tools' && sudo yum -y install curl irb m4 ruby | |
# Sanitize the environment | |
PATH=~/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin | |
unset LD_LIBRARY_PATH PKG_CONFIG_PATH | |
# install linuxbrew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#list all ports for tcp | |
sudo lsof -itcp | |
#find all things listening on ports | |
lsof -Pnl +M -i4 | grep LISTEN | |
#all ports for tcp, dont resolve port name from numbers | |
sudo lsof -itcp -P | |
#open files and ports of process #$PID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Count total EBS based storage in AWS | |
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add" | |
# Count total EBS storage with a tag filter | |
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add" | |
# Describe instances concisely | |
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]' | |
# Wait until $instance_id is running and then immediately stop it again | |
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id | |
# Get 10th instance in the account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
cd ~/.vim/bundle | |
for i in `\ls -p -d */`; do | |
cd "$i" | |
echo "Updating $i..." | |
git pull --recurse-submodules | grep -v 'Already up-to-date' | sed 's/^/ /' | |
[ -f .git/.gitmodules ] && git submodule update | sed 's/^/ /' | |
cd .. | |
done |
OlderNewer