Skip to content

Instantly share code, notes, and snippets.

View ramazansancar's full-sized avatar
📚
Study

Ramazan Sancar ramazansancar

📚
Study
View GitHub Profile
/* 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 / Application Tracking System List.json
Last active December 13, 2022 07:00
Application Tracking System (ATS) List source by angel.co Recruit
[
{
"name": "Greenhouse",
"shortName": "greenhouse"
},
{
"name": "Lever",
"shortName": "lever"
},
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>İÜ Bilgisayar Programcılığı Final Tarihi</title>
<style>
body {
text-align: center;
padding: 70px 50px;
background: #0D1A29;
@ramazansancar
ramazansancar / SMS_Providers_Table.md
Last active December 1, 2022 15:01
SMS Send API Provider List
Gateway Bulk SMS MMS Premium Free Countries
Twilio checked checked checked cancel Global
Zipwhip cancel cancel checked cancel Global
Kaleyra checked cancel checked cancel Global
Telnyx checked cancel checked cancel United States
SMS.to checked cancel checked checked Global
SendPulse checked cancel checked cancel Global
Octopush checked cancel checked checked Global
SL Interactive checked cancel checked checked Africa