Skip to content

Instantly share code, notes, and snippets.

View sajed-zarrinpour's full-sized avatar
:octocat:
Researching...

Sajed Zarinpour Nashroudkoli sajed-zarrinpour

:octocat:
Researching...
View GitHub Profile
@sajed-zarrinpour
sajed-zarrinpour / video_and_audio_streaming_laravel_5_8_.blade.php
Created August 15, 2019 19:55
minimalistic video and audio streaming for laravel 5.8
@extend('layouts.app')
@section('content')
<video id="player" playsinline webkit-playsinline controls="controls"
preload="metadata" data-cast-title="your-title"
data-cast-description="your-description">
<source src="{{route('video-stream',[$your-model->stream_uri])}}" type="video/mp4">
</video>
<audio id="player2" preload="none" controls width="750"
data-cast-title="your-title"
@sajed-zarrinpour
sajed-zarrinpour / summernote_WYSIWYG_editor_serverside_handling_image_upload.php
Last active October 16, 2022 05:32
Clean server side solution for summernote WYSIWYG editor image uploading
<?php
/*
* Based on this blog post: https://www.codewall.co.uk/install-summernote-with-laravel-tutorial/
* here is my solution for the summernote editor image upload.
* Notes :
***** Do not forget enctype="multipart/form-data" attribute in your form ;)
***** Use unscaped blade syntax {!! $data !!} to render the results
***** Make sure you read laravel 5.8 Storage Documentation here : https://laravel.com/docs/5.8/filesystem#the-public-disk
***** For Simplicity I used clusures, means that this is originally **routes/web.php** file!
@sajed-zarrinpour
sajed-zarrinpour / summernote-upload.js
Last active August 6, 2019 15:01 — forked from abr4xas/summernote-upload.js
Summernote image upload
$('.summer').summernote({
height: "200px",
callbacks: {
onImageUpload: function(files) {
url = $(this).data('upload'); //path is defined as data attribute for textarea
sendFile(files[0], url, $(this));
}
}
});
@sajed-zarrinpour
sajed-zarrinpour / residual_network.py
Created July 6, 2019 13:28 — forked from mjdietzx/residual_network.py
Clean and simple Keras implementation of residual networks (ResNeXt and ResNet) accompanying accompanying Deep Residual Learning: https://blog.waya.ai/deep-residual-learning-9610bb62c355.
"""
Clean and simple Keras implementation of network architectures described in:
- (ResNet-50) [Deep Residual Learning for Image Recognition](https://arxiv.org/pdf/1512.03385.pdf).
- (ResNeXt-50 32x4d) [Aggregated Residual Transformations for Deep Neural Networks](https://arxiv.org/pdf/1611.05431.pdf).
Python 3.
"""
from keras import layers
from keras import models