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 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.
@ramazansancar
ramazansancar / command.sh
Created January 20, 2023 08:44
Windows App Update Command
winget upgrade --all
const fetch = require('node-fetch');
const { readFileSync, writeFileSync } = require('fs');
const filePath = "./radarrTorrents.json" // where to store info about current torrents being downloaded
const maxAcceptedDownloadTime = 6000000; // any torrent that takes longer than this time (in milliseconds) to download is abandonded
const maxFileSize = 4000000000 // any torrent greater than this size (in bytes) is exempt from the time limit restriction
const waitTime = 600000; // how much time (in milliseconds) to give the torrent to find peers and lower it's download time
const dateLocale = "en-GB";
const dateOptions = { dateStyle: 'short', timeStyle: 'short' };
const fetch = require('node-fetch');
const { readFileSync, writeFileSync } = require('fs');
const filePath = "./radarrTorrents.json" // where to store info about current torrents being downloaded
const maxAcceptedDownloadTime = 6000000; // any torrent that takes longer than this time (in milliseconds) to download is abandonded
const maxFileSize = 4000000000 // any torrent greater than this size (in bytes) is exempt from the time limit restriction
const waitTime = 600000; // how much time (in milliseconds) to give the torrent to find peers and lower it's download time
const dateLocale = "en-GB";
const dateOptions = { dateStyle: 'short', timeStyle: 'short' };
[{"id":193,"name":"Acıbadem Mehmet Ali Aydınlar\r\nÜniversitesi","city":"İstanbul","founded":null,"type":null,"website":"http://www.acibadem.edu.tr","numberOfStudent":null},{"id":194,"name":"Adana Alparslan Türkeş Bilim Ve\r\nTeknoloji Üniversitesi","city":"Adana","founded":null,"type":null,"website":"http://www.atu.edu.tr","numberOfStudent":null},{"id":195,"name":"Adıyaman Üniversitesi","city":"Adıyaman","founded":null,"type":null,"website":"http://www.Adıyaman.edu.tr/","numberOfStudent":null},{"id":196,"name":"Afyon Kocatepe Üniversitesi","city":"Afyon","founded":null,"type":null,"website":"http://www.aku.edu.tr","numberOfStudent":null},{"id":197,"name":"Afyonkarahisar Sağlik Bilimleri\r\nÜniversitesi","city":"Afyon","founded":null,"type":null,"website":"www.afsu.edu.tr","numberOfStudent":null},{"id":198,"name":"Ağrı İbrahim Çeçen Üniversitesi","city":"Ağrı","founded":null,"type":null,"website":"http://www.agri.edu.tr","numberOfStudent":null},{"id":199,"name":"Akdeniz Üniversitesi","city":"Antalya","founde
@ramazansancar
ramazansancar / If you have a story that you are proud to tell, can you share it with us?.md
Last active December 14, 2022 11:34
Etiya Akademi 5.Dönem / Yazılım Geliştirme Başvuru Formu

I was able to arrange a meeting with someone in charge of the Rectorate Building for the KLU Announcement project after 1 week of trying to get poster permission at the school. Then I had the interview. It will be forwarded to the Rector, etc. it said. Then they said it was "Part Time Student Recruitment". (This was like the secret form of saying apply.) I applied too. I went to the interview on Monday. And I was hired by saying "we know you". After 2-3 months, I got used to the work environment and got some environment. I like to mess around with every system I find by nature. I noticed a security vulnerability while I was tampering with something on the University's site. And this vulnerability was a security vulnerability that allows you to access all files as if you have root authority on the system, allowing operations such as editing, deleting. To report this as White Hat, I went to IT and told the Engineers about the vulnerability and how it could be closed. Then I went to my room to return to my job,