Skip to content

Instantly share code, notes, and snippets.

💻
Coding

Cesar Bretana Gonzalez bretanac93

💻
Coding
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
bretanac93 / README-Template.md
Created Jun 4, 2019 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

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.

Prerequisites

View advanced-js-resources.md

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
<template>
<section class="container">
<a href="https://github.com/login/oauth/authorize?scope=user:email&client_id=87d59a5fead575683be3">Login with Github</a>
</section>
</template>
<script>
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(cors());
app.use(bodyParser.urlencoded({extended: false}));
@bretanac93
bretanac93 / app.nginx.conf
Created Nov 28, 2017
Nginx configuration file for PHP Applications
View app.nginx.conf
server {
index index.php;
server_name bretanart.com;
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
bretanac93 / docker-compose.yml
Last active Nov 28, 2017
Docker compose file for Deploying PHP Applications
View docker-compose.yml
version: '3'
services:
php:
image: php:fpm
volumes:
- ./code:/code
web:
image: nginx
ports:
- "8080:80"
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<h1>This is a test</h1>
</body>
</html>
View Spring-Boot .gitignore
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
@bretanac93
bretanac93 / README.md
Created Mar 8, 2016 — forked from tjamps/README.md
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle
View README.md

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. v1.api.example.com)

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

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