- Need a project idea, e.g., web crawler
- Mess around, learn language
- Complete functionality
- Refactor
- Eliminate bugs (bug-free by EOD)
| from flask import Flask | |
| from flask import jsonify | |
| from flask import request | |
| from flask_cors import CORS, cross_origin | |
| import socket | |
| TCP_IP = '127.0.0.1' | |
| TCP_PORT = 5959 | |
| BUFFER_SIZE = 20 |
| FROM php:5.6-fpm | |
| RUN apt update && apt install -y git zlib1g-dev | |
| RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
| WORKDIR /app |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| const gulp = require('gulp'); | |
| const browserSync = require('browser-sync').create(); | |
| const sass = require('gulp-sass'); | |
| gulp.task('serve', ['sass'], function() { | |
| browserSync.init({ | |
| proxy: 'mood.dev' | |
| }); | |
| gulp.watch('sass/**/*.scss', ['sass']); |
Dockerfile that is based on your production image and
simply install xdebug into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # http://assicanti.pt/category/uptec/ | |
| import PyPDF2 | |
| import re | |
| from itertools import takewhile |
| import sys | |
| from pprint import pprint | |
| import wtforms_json | |
| from flask import Flask, g, request, redirect, url_for | |
| from flask_marshmallow import Marshmallow | |
| from flask_restful import Resource, Api | |
| from flask_sqlalchemy import SQLAlchemy | |
| from flask_wtf import FlaskForm |
The API we are creating in this gist will follow these rules :
password Grant Type only (no need for Authorization pages and such).v1.api.example.com)The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :
| Set the magento permissions | |
| find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento |