Skip to content

Instantly share code, notes, and snippets.

@sitkevij
sitkevij / install-chef-client.sh
Last active August 29, 2015 14:04
install chef client
curl -L https://www.opscode.com/chef/install.sh | sudo bash
echo 'export PATH="/opt/chef/embedded/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile
sudo chef-server-ctl reconfigure
@sitkevij
sitkevij / hex.sh
Created May 18, 2012 18:21
bash script to convert a string from hex to decimal
HEX=c9fc17d693b58ad31448d1177728964591ad1c720b545a05c700395c980a7029
i=1
while (( i <= ${#HEX} ))
do
char=$(expr substr "$HEX" $i 2)
# echo "<$char>"
printf "%d\n" 0x$char
(( i += 2 ))
done