Skip to content

Instantly share code, notes, and snippets.

View itsAnanth's full-sized avatar
🧠
figuring out stuff

Ananth itsAnanth

🧠
figuring out stuff
View GitHub Profile
@itsAnanth
itsAnanth / bubbleSort.js
Last active November 28, 2021 17:29
Implementation of bubble sort in javascript
// bubble sort in javascript
Array.prototype.bubbleSort = function(callback = (a, b) => a > b) {
const array = this;
for (let i = 0; i < array.length; i++) {
let swaps = 0;
for (let j = 0; j < array.length - i - 1; j++) {
if (callback(array[j], array[j + 1])) {
let temp = array[j];
array[j] = array[j + 1];
@karpathy
karpathy / min-char-rnn.py
Last active November 4, 2025 14:31
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@worawit
worawit / cve-2015-0240_samba_poc
Last active October 29, 2025 17:52
PoC for Samba vulnerabilty (CVE-2015-0240)
#!/usr/bin/python
"""
PoC for Samba vulnerabilty (CVE-2015-0240) by sleepya
This PoC does only triggering the bug
Reference:
- https://securityblog.redhat.com/2015/02/23/samba-vulnerability-cve-2015-0240/
#################
Exploitability against CentOS/Ubuntu binaries