Skip to content

Instantly share code, notes, and snippets.

View zaw-hlaing-bwar's full-sized avatar

Zaw Hlaing Bwar zaw-hlaing-bwar

View GitHub Profile
@zaw-hlaing-bwar
zaw-hlaing-bwar / app.js
Last active November 20, 2019 09:22
send req.body using res.send
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
var cors = require('cors');
var indexRouter = require('./indexRoute');
var usersRouter = require('./usersRoute');
var app = express();
@zaw-hlaing-bwar
zaw-hlaing-bwar / create_thumbnail.php
Created November 8, 2016 05:17 — forked from pedroppinheiro/create_thumbnail.php
This php funtion creates a thumbnail of an image. It supports JPEG, JPG, PNG and GIF formats and can be used to define a specific background color, including transparent when dealing with PNG.
<?php
/**
* This code is an improvement over Alex's code that can be found here -> http://stackoverflow.com/a/11376379
*
* This funtion creates a thumbnail with size $thumbnail_width x $thumbnail_height.
* It supports JPG, PNG and GIF formats. The final thumbnail tries to keep the image proportion.
*
* Warnings and/or notices will also be thrown if anything fails.
*
* Example of usage: