Install portaudio using homebrew (or method of your choice)
brew install portaudio
create $HOME/.pydistutils.cfg using the include
and lib
directories of your portaudio install:
[build_ext]
//http function promise example | |
function getPackages(){ | |
var deferred = $q.defer(); | |
$http.get(BaseApiUrl + '/packages/') | |
.success(function(data, status, headers, config) { | |
deferred.resolve(data.results); | |
}) | |
.error(function(status) { |
Remove existing files from the repository: | |
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch | |
find . -iregex ".*\.\(pyc\)" -print0 | xargs -0 git rm -f --ignore-unmatch | |
Add the line | |
.DS_Store | |
to the file .gitignore, which can be found at the top level of your repository (or created if it isn't there already). Then | |
git add .gitignore |
Install portaudio using homebrew (or method of your choice)
brew install portaudio
create $HOME/.pydistutils.cfg using the include
and lib
directories of your portaudio install:
[build_ext]
brew install autoconf | |
brew install automake | |
brew install libtool | |
brew install apple-gcc42 | |
brew install libyaml | |
brew install libxslt | |
brew install libksba | |
brew install openssl |
server { | |
listen 443; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/server.crt; | |
ssl_certificate_key /etc/nginx/ssl/server.key; | |
server_name phpmyadmin.example.loc; | |
root /var/www/vhosts/pma/; | |
index index.php; |
After install postgresql on mac os x, generally you need to do the following things: | |
you need to replace the /usr/lib/libpq.5.dylib library because its version is too old. | |
Here's my solution to this problem: | |
$ sudo mv /usr/lib/libpq.5.dylib /usr/lib/libpq.5.dylib.old | |
$ sudo ln -s /Library/PostgreSQL/9.4/lib/libpq.5.dylib /usr/lib |
1.- ssh into the vps | |
2.- create a new virtualenv | |
3.- clone the repository | |
4.- install the needed dependencies (through the requeriments file) | |
5.- check the database connection and then migrate the models | |
6.- config static folder and collectstatic | |
6.- configure gunicorn/supervisord | |
7.- configure nginx reverse proxy |
server { | |
listen 80; | |
server_name server_name; | |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-REAL-IP $remote_addr; | |
proxy_pass http://host:port/; | |
proxy_buffering off; | |
} |
public function readExcel(){ | |
// Include PHPExcel_IOFactory | |
App::import('Vendor', 'Classes/PHPExcel'); | |
$inputFileName = "../Vendor/phpExcel/docs/vacas-empleados.xlsx"; | |
// Read your Excel workbook |
<?php | |
// Importamos la clase PHPExcel | |
App::import('Vendor', 'Classes/PHPExcel'); | |
$locale = 'es'; | |
$validLocale = PHPExcel_Settings::setLocale($locale); | |
if (!$validLocale) { | |
echo 'Unable to set locale to '.$locale." - reverting to en_us<br />\n"; | |
} |