Skip to content

Instantly share code, notes, and snippets.

View SumonMSelim's full-sized avatar
🎯
Focusing

Muhammad Sumon Molla Selim SumonMSelim

🎯
Focusing
View GitHub Profile
<?php
// Visual composer get terms on dropdown params
if( !function_exists('vcdd_get_terms') ){
function vcdd_get_terms( $taxonomy = 'category' ){
$get_categories = get_categories( array(
'taxonomy' => $taxonomy,
) );
foreach ( $get_categories as $category ) {
$categories[] = [ $category->term_id => $category->name ];
}
@mrbar42
mrbar42 / README.md
Last active March 28, 2024 18:06
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
// define route like this
Route::get('single/{id}/{any}',"BaseController@Single_Items")->name('item.single');
//make a function like below in your helper file
function Replace($data) {
$data = str_replace("'", "", $data);
$data = str_replace("!", "", $data);
$data = str_replace("@", "", $data);
$data = str_replace("#", "", $data);
from jira import JIRA
import pandas as pd
import pdb
from collections import defaultdict
import datetime
import pprint
class ImportJiraAnalyticsData:
@zabaala
zabaala / BindDatabaseServiceProvider.php
Last active March 2, 2021 07:50
php artisan db:log <start> <stop>
<?php
namespace App\Commands\Database;
use Illuminate\Support\ServiceProvider;
class BindDatabaseServiceProvider extends ServiceProvider
{
public function boot()
{
@nuhil
nuhil / js.md
Last active November 20, 2021 18:06
Javascript Handbook
@fideloper
fideloper / stream_file.php
Last active January 17, 2024 18:41
Stream file from S3 to browser, assume Laravel Filesystem usage
<?php
/*************************************************************************
* Get File Information
*/
// Assuming these come from some data source in your app
$s3FileKey = 's3/key/path/to/file.ext';
$fileName = 'file.ext';
@spencerhunter
spencerhunter / TransferAndEvents.md
Last active June 14, 2023 20:10
Outlines the sequence of events that are triggered for a subset of Dwolla payment flows that are bank-to-bank via ACH

Overview

Use this doc as a reference to map out the sequence of events your app will receive based on Customer type(s) involved in the transfer as well as where the funds are coming from and going to (bank or balance). The following transfer scenarios are covered in this doc:

Transfer scenario 1 - Source: Verified Customer bank Destination: Verified Customer bank.
Transfer scenario 2 - Source: Verified Customer bank Destination: Unverified Customer bank.
Transfer scenario 3 - Source: Unverified Customer bank Destination: Verified Customer bank.

Both success and failure cases will be shown as well as what occurs in the event of a bank transfer failure.

**General recommend

@leninhasda
leninhasda / auto-move-downloads.py
Created December 3, 2016 19:32
utility script to automatically move the specified files from downloads directory to proper directory
# import
import os
from os import path, listdir as list_dir, rename as move
from os.path import isdir as is_dir, isfile as is_file
from pprint import pprint
import shutil
# global variables
#==================
<?php namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
class MakeAll extends Command
{
/**
* The name and signature of the console command.
*