Skip to content

Instantly share code, notes, and snippets.

@byigitt
byigitt / unfollow.go
Last active February 15, 2024 20:58
unfollow ppl who dont follow back in github with golang :-)
package main
import (
"context"
"fmt"
"log"
"github.com/google/go-github/v39/github"
"golang.org/x/oauth2"
)
@byigitt
byigitt / 1lastfm.js
Last active February 2, 2024 09:31
checks all keywords from a json file (which includes an array of keywords) and check if it is valid as username on last.fm
// In last.fm website, if a user creates the account and disables it, other people cannot get the old username
// so, this is not %100 valid for username checking purposes. I would use the API while creating your account
// but it has CSRF stuff and I dont know how to bypass it to be honest and I didnt care that much.. soo.. here ya go!
import fs from "fs";
import got from "got";
function read(file) {
return JSON.parse(fs.readFileSync(file, "utf8"));
}
@byigitt
byigitt / soundcloud.js
Last active January 4, 2024 12:44
creates & checks all usernames with 3 letters if they are available as soundcloud usernames or not
const fs = require("fs");
(async () => {
const generateWords = () => {
const alphanumeric = "abcdefghijklmnopqrstuvwxyz0123456789";
const words = [];
for (let i = 0; i < alphanumeric.length; i++) {
for (let j = 0; j < alphanumeric.length; j++) {
for (let k = 0; k < alphanumeric.length; k++) {
@byigitt
byigitt / github-unfollower.js
Last active December 10, 2023 13:09
find ppl that doesnt follow u back :)
// To install what needed: npm install @octokit/rest
const { Octokit } = require("@octokit/rest");
// Do not forget to change things to your desire!
// Get your token here: https://github.com/settings/tokens
const opts = {
GITHUB_TOKEN: "your token here",
GITHUB_USERNAME: "your username here"
};
@byigitt
byigitt / tc-kimlik.js
Created December 1, 2023 08:08
creating & checking turkish identity numbers
function randomInteger (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
};
function idGenerator () {
let n = [];
for (let i = 0; i < 9; i++) {
n.push(randomInteger(1, 9));
};
@byigitt
byigitt / organiser.js
Created December 1, 2023 08:08
file organiser @ nodejs
const fs = require('fs');
const path = require('path');
let formats = {
"web": [".html", ".htm", ".html5", "xhtml"],
"pictures": [".jpeg", ".jpg", ".tiff", ".gif", ".bmp", ".png", ".bpg", "svg",".heif", ".psd", ".jfif", ".svg", ".webp"],
"videos": [".avi", ".mkv",".flv", ".wmv", ".mov", ".mp4", ".webm", ".vob", ".mng",".qt", ".mpg", ".mpeg", ".3gp"],
"documents": [".oxps", ".epub", ".pages", ".docx", ".txt", ".pdf", ".doc", ".fdf", ".ods",".odt", ".pwi", ".xsn", ".xps", ".dotx", ".docm", ".dox", ".rvg", ".rtf", ".rtfd", ".wpd", ".xls", ".xlsx", ".ppt", ".pptx"],
"compressed": [".a", ".ar", ".cpio", ".iso", ".tar", ".gz", ".rz", ".7z", ".dmg", ".rar", ".xar", ".zip"],
"audio": [".aac", ".aa", ".aac", ".dvf", ".m4a", ".m4b", ".m4p", ".mp3", ".msv", "ogg", "oga", ".raw", ".vox", ".wav", ".wma", ".ogg"],
@byigitt
byigitt / upload.js
Created December 1, 2023 08:07
basic upload rest api for sharex
const { nanoid } = require('nanoid'),
express = require('express'),
multer = require('multer'),
fs = require('fs'),
app = express()
const uploads = multer({ dest: 'static/' })
app
.use(express.static('static'))
@byigitt
byigitt / valorant-store.js
Created December 1, 2023 08:06
to check daily valorant store in your commandline
require('dotenv').config();
const Valorant = require('@liamcottle/valorant.js');
async function getStore(username, password, region) {
const valAPI = new Valorant.API(region);
const contentAPI = new Valorant.ContentAPI();
valAPI.user_agent = "RiotClient/60.0.10.4802528.4749685 rso-auth (Windows;10;;Professional, x64)";
valAPI.client_version = "release-05.10-shipping-11-796984";
@byigitt
byigitt / log.bat
Created December 1, 2023 08:02
clears out pc's log or old files
:: open it with admin rights
@echo off
del /a /s /q %windir%\temp & md %windir%\temp>nul
del /a /s /q %userprofile%\recent\*.*>nul
del /a /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*">nul
del /a /s /q "%userprofile%\Local Settings\Temp\*.*">nul
del /a /s /q "%userprofile%\recent\*.*">nul
del /a /s /q %systemdrive%\*.tmp>nul
@byigitt
byigitt / survey.js
Created December 1, 2023 08:01
survey filler for end-of-semester surveys
// copy paste this into your browser's console
let elements = [...document.querySelectorAll('input[type="radio"]')];
let val = elements.filter((obj) => obj.value == 4);
for (let i = 0; i < val.length; i++) {
val[i].click();
};