sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit
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
<pre> | |
<?php | |
$username = 'admin'; | |
$key = 'd525e743ee692632b52a05570444aa537e06a8cc'; | |
$created = date('c'); | |
$nonce = substr(md5(time()), 0, 16); | |
$sha1 = sha1($nonce . $created . $key, true); | |
$digest = base64_encode($sha1); | |
echo "user: {$username}" . PHP_EOL; |
Configure local wildcard DNS server
- Install Dnsmasq:
sudo apt-get install dnsmasq
- Since Ubuntu's NetworkManager uses dnsmasq, and since that messes things up a little for us, open up
/etc/NetworkManager/NetworkManager.conf
and comment out (#
) the line that readsdns=dnsmasq
. Restart NetworkManager afterwards:sudo restart network-manager
. - Make sure Dnsmasq listens to local DNS queries by editing
/etc/dnsmasq.conf
, and adding the linelisten-address=127.0.0.1
. - Create a new file in
/etc/dnsmasq.d
(eg./etc/dnsmasq.d/dev
), and add the lineaddress=/dev/127.0.0.1
to have dnsmasq resolve requests for *.dev domains. Restart Dnsmasq:sudo /etc/init.d/dnsmasq restart
.
source: http://brunodbo.be/blog/2013/04/setting-up-wildcard-apache-virtual-host-wildcard-dns
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
<?php | |
print "\n"; | |
$rsa = file_get_contents('rsa.pub'); | |
$ssh = file_get_contents('ssh.pub'); | |
// For reference | |
print $rsa . "\n\n"; | |
print $ssh . "\n\n"; |
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
brew install dnsmasq | |
cd $(brew --prefix) | |
mkdir etc | |
echo 'address=/.dev/127.0.0.1' >> etc/dnsmasq.conf | |
echo 'address=/.loc/127.0.0.1' >> etc/dnsmasq.conf | |
sudo chown root $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist | |
sudo ln -s $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons/ | |
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
sudo mkdir /etc/resolver | |
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev' |
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
http://brew.sh - The missing package manager for OS X | |
https://www.iterm2.com - iTerm2 is a replacement for Terminal | |
https://tunnelblick.net - free software for OpenVPN on OS X | |
https://github.com/jimbojsb/launchrocket - A Mac PreferencePane for managing services with launchd | |
http://www.sequelpro.com/ - MySQL Database Management for Mac OS X | |
https://itunes.apple.com/us/app/copyclip-clipboard-history/id595191960?mt=12 - Clipboard History Manager | |
https://monosnap.com - Free Screenshot snd Screencast Tool | |
http://www.kekaosx.com - Archive tool | |
http://bindfs.org/ - bind local folder |
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
mysqldump --no-create-info --single-transaction --skip-triggers -uroot -p pradam $(mysql -uroot -proot pradam -e "show tables" | grep ^sales | tr '\n' ' ') > sales_tables.sql |
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
mysql -uroot -proot pradam_new -e "show tables" | grep ^customer_ | awk '{print "delete from "$0";"}' | mysql -uroot -proot pradam_new |
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
MYENVVAR="world" salt-call state.template test.sls |
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
For Debian, sysbench is hard to beat. It's a simple 1-2-3: | |
Install | |
sudo apt-get install sysbench | |
Prepare | |
sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword prepare |