Skip to content

Instantly share code, notes, and snippets.

<?php
public function store(Request $request)
{
$this->validate($request, [
'filename' => 'image|required|mimes:jpeg,png,jpg,gif,svg'
]);
$originalImage= $request->file('filename');
$thumbnailImage = Image::make($originalImage);
$thumbnailPath = public_path().'/thumbnail/';
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" rel="stylesheet" />
<link href="{{ url_for('static', filename='css/style.css') }}" type="text/css" rel="stylesheet" />
from flask import Flask, render_template, request
import webbrowser
from threading import Timer
app = Flask(__name__)
@app.route('/')
def index():
title = 'Google Map Place Scraper'
<?php
// params group
array(
'type' => 'param_group',
'heading' => 'Param Groups',
'value' => '',
'param_name' => 'titles',
'params' => array(
@themebon
themebon / EDD_SL_Theme_Updater-Class.php
Created May 10, 2019 20:23
class that require edd license check
<?php
class EDD_SL_Theme_Updater {
private $remote_api_url;
private $request_data;
private $response_key;
private $theme_slug;
private $license_key;
private $version;
private $author;
@themebon
themebon / edd-license-activate.php
Last active June 10, 2019 18:19
Add EDD license system
<?php
$test_license = '';
$license_data = '';
define( 'DT_KEY', 'edd_sample_theme_license_key_status');
define( 'EDD_SL_STORE_URL', 'https://codenpy.com' ); /* IMPORTANT: Do not modify this line of code, the theme could stop working correctly */
define( 'EDD_SL_THEME_NAME', 'Industrue - Industrial & Factory WordPress Theme' ); /* IMPORTANT: Do not modify this line of code, the theme could stop working correctly */
if ( !class_exists( 'EDD_SL_Theme_Updater' ) ) {
include( dirname( __FILE__ ) . '/edd-class-file-here.php' );
}
<?php
acf_form_head();
get_header();
// Show custom post fields in front end
acf_form(array(
'post_id' => 'new_post',
'new_post' => array(
'post_type' => 'movie',
'post_status' => 'publish'
<?php
add_shortcode('donation-posts', 'fnDonatePosts');
function fnDonatePosts($atts, $content = null) {
extract( shortcode_atts( array(
'id' => '',
'cat' => '',
'category_name' => '',
'num' => 6,
<?php
/* ------------------------------------------------------------------------ */
/* Create Portfolio Template @@ single_template */
/* ------------------------------------------------------------------------ */
add_filter( 'single_template', 'delicious_portfolio_single' );
function delicious_portfolio_single($single_template) {
global $post;
<?php
$q = new WP_Query(
array('posts_per_page' => -1, 'post_type' => 'hover_effect', 'p' => $id)
);
while($q->have_posts()) : $q->the_post();