I hereby claim:
- I am radeksimko on github.
- I am radeksimko (https://keybase.io/radeksimko) on keybase.
- I have a public key whose fingerprint is A301 4A24 C699 8F16 7D31 FD77 1079 D611 5CFD 80AD
To claim this, I am signing this object:
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: elasticsearch | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts elasticsearch | |
# Description: Starts elasticsearch using start-stop-daemon | |
### END INIT INFO |
db.getCollectionNames().forEach( function ( collectionName ) { | |
print( collectionName ); | |
var indexes = db.eval( 'db.' + collectionName + '.getIndexes()' ); | |
indexes.forEach( function( index ) { | |
print( ' - (v ' + index.v + ') ' + index.name ); | |
}); | |
}); |
// third way | |
$example->foo(2, 2) | |
->andReturn(4) | |
->foo(4, 4) | |
->andReturn(8) | |
->foo(8, 8) | |
->andReturn(16); |
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/ | |
git clone git://github.com/wbond/sublime_package_control.git Package\ Control | |
cd Package\ Control | |
git checkout python3 | |
# restart Sublime Text 3 and you should have Package Control working |
idsToRemove=( | |
"com.apple.Notes" | |
) | |
plistBuddy='/usr/libexec/PlistBuddy' | |
dockPlistPath="$HOME/Library/Preferences/com.apple.dock.plist" | |
for appIDToRemove in $idsToRemove; do | |
iconsIndexes=`defaults read com.apple.dock persistent-apps | grep tile-type | awk '/file-tile/ {print NR}'` |
I hereby claim:
To claim this, I am signing this object:
export GOPATH=$HOME/gopath | |
# Path | |
export PATH=/opt/local/bin:/usr/local/bin:/opt/local/sbin:/usr/local/sbin:$PATH | |
export PATH=/usr/local/share/npm/bin:$PATH # NPM | |
export PATH=/usr/local/mysql/bin:$PATH # MySQL | |
export PATH=/usr/local/pear/bin:$PATH # Pear | |
export PATH=/usr/local/opt/gnu-sed/libexec/gnubin:$PATH # sed | |
export PATH=$GOPATH/bin:$PATH # Go |
#!/usr/local/bin/bash | |
RESULTS=`grep ' version ' ./Casks/*.rb` | |
for RESULT in $RESULTS; do | |
FILE=$(echo $RESULT | cut -d: -f 1) | |
VERSION=$(echo $RESULT | cut -d\' -f 2) | |
OCCURENCE=$(grep -c '$VERSION' $FILE) | |
if [[ $OCCURENCE -ge 2 ]]; then |
AMI_ID=$1 | |
REGION=$2 | |
output=$(aws --region $REGION ec2 describe-images \ | |
--filter "Name=image-id,Values=$AMI_ID" --output=text | head -1) | |
ORIGINAL_AMI_NAME=$(echo "$output" | awk -F\t '{print $11}') | |
ORIGINAL_AMI_OWNER=$(echo "$output" | awk -F\t '{print $12}') | |
if [[ ! $ORIGINAL_AMI_OWNER =~ ^[0-9]{10,}$ ]]; then |