Skip to content

Instantly share code, notes, and snippets.

View nimahkh's full-sized avatar
🤩
Yo u can do everything you want

Nima Habibkhoda nimahkh

🤩
Yo u can do everything you want
  • Software Engineer
  • The Netherlands
  • X @nimahkh1
View GitHub Profile
@nimahkh
nimahkh / addSRT2MKV.sh
Last active October 26, 2023 22:40
add srt subtitle into mkv video with FFMPEG- put all off your mkv and srt files with same names ina folder and run sh command. all of the converted files will be in the added folder inside the current folder.
#!/bin/bash
#author: nima.2004hkh@gmail.com
#ffmpeg command from : https://gist.github.com/kurlov/32cbe841ea9d2b299e15297e54ae8971
NOCOLOR='\033[0m';
RED='\033[0;31m';
GREEN='\033[0;32m';
[ -d added ] || mkdir added
@nimahkh
nimahkh / swipe.js
Created January 7, 2020 08:06 — forked from SleepWalker/swipe.js
A simple swipe detection on vanilla js
var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;
var gesuredZone = document.getElementById('gesuredZone');
gesuredZone.addEventListener('touchstart', function(event) {
touchstartX = event.screenX;
touchstartY = event.screenY;
@nimahkh
nimahkh / index.js
Created September 14, 2019 05:05
javascript flat infinity
const array=[[1,2,[3]],4];
array.flat(Infinity)
//Array(4) [ 1, 2, 3, 4 ]
@nimahkh
nimahkh / App.css
Last active July 10, 2020 03:05
reactjs simple context functions to manage states
.App {
text-align: center;
}
.App-logo {
animation: App-logo-spin infinite 20s linear;
height: 40vmin;
pointer-events: none;
}
@nimahkh
nimahkh / db.json
Created February 19, 2019 08:13
json-dataset
[
{
"date": "2010-01-04",
"open": "25.436282332605284",
"high": "25.835021381744056",
"low": "25.411360259406774",
"close": "25.710416",
"volume": "38409100",
"split": "",
"dividend": ""
@nimahkh
nimahkh / download.sh
Created October 9, 2018 14:00
bash script to Download by axel with high speed
#!/bin/bash
if ! which axel > /dev/null; then
while true; do
read -p "Axel not found,Do you wish to install this program?" yn
case $yn in
[Yy]* ) sudo apt-get install axel; break;;
[Nn]* ) exit;;
#!/bin/sh
#######################################
#NimaHKH
#######################################
#COLORS
# Reset
Color_Off='\033[0m' # Text Reset
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){function t(t,n){var e=t.find("tr:has(td)"),o=String.fromCharCode(11),a=String.fromCharCode(0),r='"'+e.map(function(t,n){return $(n).find("td").map(function(t,n){return $(n).text().replace(/"/g,'""')}).get().join(o)}).get().join(a).split(a).join('"\r\n"').split(o).join('","')+'"';if(window.Blob&&window.URL){var i=new Blob([r],{type:"text/csv;charset=utf-8"}),c=URL.createObjectURL(i);$(this).attr({download:n,href:c})}else{var d="data:application/csv;charset=utf-8,"+encodeURIComponent(r);$(this).attr({download:n,href:d,target:"_blank"})}}$(".export").on("click",function(n){var e=[$("#dvData>table"),"export.csv"];t.apply(this,e)})});
</script>
<style>
a.export,
a.export:visited {
display: inline-block;
text-decoration: none;