Skip to content

Instantly share code, notes, and snippets.

View rajesh-smartwebtech's full-sized avatar
🎯
Focusing

Rajesh Sureliya rajesh-smartwebtech

🎯
Focusing
View GitHub Profile
@dvlden
dvlden / ffmpeg.md
Last active May 14, 2024 14:25
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@maxan
maxan / web.config
Last active November 14, 2023 11:43
IIS Config to React Router App
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
</conditions>
@Ivlyth
Ivlyth / js-date-format.js
Last active May 15, 2024 13:27
format javascript date to format "YYYY-mm-dd HH:MM:SS"
var d = new Date();
d = new Date(d.getTime() - 3000000);
var date_format_str = d.getFullYear().toString()+"-"+((d.getMonth()+1).toString().length==2?(d.getMonth()+1).toString():"0"+(d.getMonth()+1).toString())+"-"+(d.getDate().toString().length==2?d.getDate().toString():"0"+d.getDate().toString())+" "+(d.getHours().toString().length==2?d.getHours().toString():"0"+d.getHours().toString())+":"+((parseInt(d.getMinutes()/5)*5).toString().length==2?(parseInt(d.getMinutes()/5)*5).toString():"0"+(parseInt(d.getMinutes()/5)*5).toString())+":00";
console.log(date_format_str);
//2015-03-31 13:35:00
@wardpeet
wardpeet / datatables_search.js
Created October 25, 2013 14:05
Trigger datatable search when user stops typing By default datatables filters by keypress (to be specific keyup event) Based on http://stackoverflow.com/questions/14042193/how-to-trigger-an-event-in-input-text-after-i-stop-typing-writting
// INITIATE DATATABLE
$(this).dataTable();
// Change the behaviour of datatables filter (wait until user stops typing)
var $filterBox = $(this).parents('.dataTables_wrapper').find('.dataTables_filter input')
, handlers = $.extend({}, $._data($filterBox[0], 'events')['keyup']); // Clone the object
// Remove all keyup methods, we will run them later
$filterBox.off('keyup')
@ebinnion
ebinnion / config.php
Created May 31, 2013 14:01
Dynamically set CodeIgniter Base URL
$root = "http://".$_SERVER['HTTP_HOST'];
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['base_url'] = "$root";