Skip to content

Instantly share code, notes, and snippets.


Cesar Bretana Gonzalez bretanac93

Block or report user

Report or block bretanac93

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bretanac93 /
Created Jun 4, 2019 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.



Advanced JavaScript Learning Resources

This is a list of advanced JavaScript learning resources from people who responded to this [Tweet][13] and this [Tweet][20].

  • [You Don't Know JS][3]

  • [Frontend Masters courses by Kyle Simpson][12]

  • [@mpjme][6]'s [YouTube videos][5]

View client.vue
<section class="container">
<a href="">Login with Github</a>
export default {
components: {
View server.js
require('dotenv').config(); // Loads the environment variables from .env files (comes really handy)
const express = require('express');
const cors = require('cors'); // Middleware for allowing requests from different origins
const bodyParser = require('body-parser');
const axios = require('axios'); // HTTP Client
const app = express();
app.use(bodyParser.urlencoded({extended: false}));
bretanac93 / app.nginx.conf
Created Nov 28, 2017
Nginx configuration file for PHP Applications
View app.nginx.conf
server {
index index.php;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /code/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
bretanac93 / docker-compose.yml
Last active Nov 28, 2017
Docker compose file for Deploying PHP Applications
View docker-compose.yml
version: '3'
image: php:fpm
- ./code:/code
image: nginx
- "8080:80"
View index.html
<!DOCTYPE html>
<h1>This is a test</h1>
View Spring-Boot .gitignore
# Mobile Tools for Java (J2ME)
# Package Files #
bretanac93 /
Created Mar 8, 2016 — forked from tjamps/
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authentication
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g.

The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :

bretanac93 /
Created Nov 27, 2015 — forked from snay2/
How to apply a semi-transparent watermark to an image using Python
from PIL import Image, ImageDraw
def main():
# Open the original image
main ="12voltm.jpg")
# Create a new image for the watermark with an alpha layer (RGBA)
# the same size as the original image
watermark ="RGBA", main.size)
# Get an ImageDraw object so we can draw on the image
You can’t perform that action at this time.