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
sudo apt-get install samba cifs-utils | |
#create samba user | |
sudo smbpasswd -a myuser | |
#configure samba | |
mousepad /etc/samba/smb.conf | |
[global] | |
client min protocol = NT1 |
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
# Command used to send a file to a remote server B only reachable through a remote server A | |
# Local <----> A <----> B | |
# receive | |
rsync -av --append -e 'ssh -o "ProxyCommand ssh user@server_A exec nc %h %p 2>/dev/null"' user@server_B:/path/source.file destination.file | |
# send | |
rsync -av --append -e 'ssh -o "ProxyCommand ssh user@server_A exec nc %h %p 2>/dev/null"' destination.file user@server_B:/path/source.file |
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
#install mongo db | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org | |
#install pecl | |
sudo apt-get install php5-dev php5-cli php-pear | |
#requisites |
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
//based on https://gist.github.com/ahallora/4aac6d048742d5de0e65 | |
$client_id = 'your client id'; | |
$client_secret = 'your client secret'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://accounts.spotify.com/api/token'); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_POST, true); |