Skip to content

Instantly share code, notes, and snippets.

View tysonchamp's full-sized avatar
🏠
Working from home

Soumya Mondal tysonchamp

🏠
Working from home
View GitHub Profile
ffmpeg -i video.mp4 -vcodec libx264 -crf 24 output.mp4
@tysonchamp
tysonchamp / loan-calculator.js
Created August 26, 2020 06:36
loan calculator js functions
function cal_eligibility() {
var e = 1e5,
r = document.getElementById("months_display").value / 12,
a = document.getElementById("interest_display").value / 100,
t = document.getElementById("income_display").value;
repay_max = 50, repay_min = 35;
var s = t * repay_max / 100,
n = t * repay_min / 100,
i = Math.pow(1 + a / 12, 12 * r),
o = parseFloat(e) / ((1 - 1 / i) / (a / 12)),
https://www.youtube.com/c/algobasket?sub_confirmation=1
@tysonchamp
tysonchamp / ci-routing
Created February 20, 2020 06:05
CI Routing htaccess and route config
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /letssub/
RewriteCond %{REQUEST_FILENAME} !-f
@tysonchamp
tysonchamp / .bashrc
Created January 12, 2020 15:36
cordova path
#android cordova code
export ANDROID_HOME=/home/gbyte/Android/Sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
@tysonchamp
tysonchamp / vesta-issues.sh
Last active March 12, 2019 06:28
Linux Commands
# PHP CI Session Clean up Command
find /home/*/tmp -type f -name 'ci_session*' -delete
find /var/log/ -type f -regex '.*\.[0-9]+\.gz$' -delete
@tysonchamp
tysonchamp / gototop.html
Created September 8, 2018 19:54
go to top jquery button
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
}
@tysonchamp
tysonchamp / htaccess cache
Created October 7, 2017 23:02
htaccess cache
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
@tysonchamp
tysonchamp / gist:a13d62a75bcc65645d370604cc0f4720
Created October 1, 2016 10:58
add remove input using javascript
<html>
<head>
<title>jQuery add / remove textbox example</title>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<style type="text/css">
div{
padding:8px;
}
[select country2 "Aruba" "Afghanistan" "Angola" "Albania" "Andorra" "United Arab Emirates" "Argentina" "Armenia" "American Samoa" "Antigua and Barbuda" "Australia" "Austria" "Azerbaijan" "Burundi" "Belgium" "Benin" "Burkina Faso" "Bangladesh" "Bulgaria" "Bahrain" "Bahamas" "Bosnia and Herzegovina" "Belarus" "Belize" "Bermuda" "Bolivia, Plurinational State of" "Brazil" "Barbados" "Brunei Darussalam" "Bhutan" "Botswana" "Central African Republic" "Canada" "Switzerland" "Chile" "China" "Côte d’Ivoire" "Cameroon" "Congo, the Democratic Republic of the" "Congo" "Cook Islands" "Colombia" "Comoros" "Cape Verde" "Costa Rica" "Cuba" "Cayman Islands" "Cyprus" "Czech Republic" "Germany" "Djibouti" "Dominica" "Denmark" "Dominican Republic" "Algeria" "Ecuador" "Egypt" "Eritrea" "Spain" "Estonia" "Ethiopia" "Finland" "Fiji" "France" "Micronesia, Federated States of" "Gabon" "United Kingdom" "Georgia" "Ghana" "Guinea" "Gambia" "Guinea-Bissau" "Equatorial Guinea" "Greece" "Grenada" "Guatemala" "Guam" "Guyana" "Hong Kong" "Ho