Skip to content

Instantly share code, notes, and snippets.

View ramazansancar's full-sized avatar
๐Ÿ“š
Study

Ramazan Sancar ramazansancar

๐Ÿ“š
Study
View GitHub Profile
@ramazansancar
ramazansancar / README.MD
Created February 24, 2025 11:20
Cursor Uninstall (%100)

Cursor Uninstall

Windows

Perform the necessary operations in the folders below.

Run Uninstall.exe:
%USERPROFILE%\AppData\Local\Programs\cursor*
@ramazansancar
ramazansancar / README.MD
Last active November 13, 2024 19:49
Hamlet (2015) 10-15-2015 1080p BDRip H.264 AAC2.0 Turkish SRT (includes: en_original.srt, tr.srt, srt_tranlator.py, Readme) - Torrents: https://rargb.to/torrent/hamlet-2015-10-15-2015-1080p-bdrip-h-264-aac2-0-5296215.html - https://1337x.to/torrent/5296215/Hamlet-2015-10-15-2015-1080p-BDRip-H-264-AAC2-0/

srt Translator

This gist contains the English srt file embedded in "Hamlet (2015) 10-15-2015 1080p BDRip H.264 AAC2.0" and the py script to translate it. And of course the translated en.srt is included.

Extractor SRT

  • After extracting mkvtoolnix-64-bit-* into the folder, put the files from gMKVExtractGUI.v*.7z into the mkvtoolnix-64-bit-* folder.
  • Start the gMKVExtractGUI program.
  • To extract the srt file, drag and drop the mkv file into the program and then the embedded video, audio and subtitles will be listed. After selecting the ones you want from them (subtitles of course :) ), you can select the Output Directory and click the Extract button. (When it runs, the bar at the bottom left will start to fill with green).
@ramazansancar
ramazansancar / mobile_detect.html
Created August 27, 2024 20:05
Mobile device detection redirector
<!-- view-source:https://www.moneypay.com.tr/download.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
@ramazansancar
ramazansancar / svgExternalSourcesBase64Converter.js
Created August 3, 2024 20:47
It converts the SVG file into base64 encoded form to include images fed from external sources and link files such as css and fonts. (I created this so that when a download request is sent with "Export the board" in miro.com and "Save as PDF", the svg file in the "Request Payload" section transmitted from the Developer Console > Network is given โ€ฆ
const axios = require('axios');
const fs = require('fs');
// SVG file to convert
const filePath = './svg_external.svg';
// Output file path
const outputFilePath = './svg_external_export_base64.svg';
/**
@ramazansancar
ramazansancar / decode.js
Last active July 7, 2024 14:13
http://oxax.tv/ JS Cripted Algoritm Decode (JS Wise) (Encryted here: http://oxax.tv/p_n_old.js) UnPacker: https://matthewfl.com/unPacker.html
var o = {
y = "xx???x=xx?xx?="
}
var abc = String.fromCharCode(65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122);
var dechar = function (x) {
return String.fromCharCode(x)
};
@ramazansancar
ramazansancar / README.MD
Created February 25, 2024 19:29
rapidvid.net M3u8 Video Download for FFMPEG
/* CONSOLE MESSAGE */
var consoleCopyrightStyle = [
"margin: 16px 0",
"border-radius: 10px"
].join(";");
var consoleWarningHeaderStyle = [
"color: #ff0000",
"font-size: 32px",
"font-weight: 600",
"margin: 8px 0"
@ramazansancar
ramazansancar / ipValidation.js
Created March 16, 2023 18:53
CodeWars Solutions
// Source: https://www.codewars.com/kata/515decfd9dcfc23bb6000006/solutions/javascript
const isValidIP = (str) => {
const octet = '(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)';
const regex = new RegExp(`^${octet}\\.${octet}\\.${octet}\\.${octet}$`);
return (regex.test(str)) ? true : false
} // Source: https://stackoverflow.com/a/54742549/15030183
function isValidIP(str) {
return /^(([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])(\.(?!$)|$)){4}$/.test(str);
@ramazansancar
ramazansancar / esm-package.md
Created March 1, 2023 14:49 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(โ€ฆ) from CommonJS instead of require(โ€ฆ).
  3. Stay on the existing version of the package until you can move to ESM.