Skip to content

Instantly share code, notes, and snippets.

View jaybosamiya's full-sized avatar
🦊

Jay Bosamiya jaybosamiya

🦊
View GitHub Profile
@jboner
jboner / latency.txt
Last active July 31, 2024 12:33
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@radiosilence
radiosilence / gist:3946121
Created October 24, 2012 13:43
Outputs some files that WMs can import and colourify everything with.
import sys
import colorsys
from colorz import colorz
WALLPAPER = '/home/james/.wallpaper'
COLORS = '/home/james/.colors'
XRESOURCES = '/home/james/.Xresources'
cols = ''
xres = """
@captn3m0
captn3m0 / README.md
Last active March 26, 2017 15:43
CCTC-Wave-I-VM-Challenge

I found the original CCTC Preliminary challenge disk in lab a few days back, and wanted to post it here in case someone wants to test their penetration testing/hacking skills. Harshil & Me had worked on it for the first round of the first iteration of CCTC (which we later won).

#Instructions

  1. Get the VMWare image from http://clipx.cloudapp.net/cctc/
  2. Hack.
  3. Credentials are student:student (username:password)
  4. Open <VM_IP>/cctc in your browser.

#Rules

@karpathy
karpathy / min-char-rnn.py
Last active July 29, 2024 00:13
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)
@haasn
haasn / about:config.md
Last active July 29, 2024 21:03
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.

@sroettger
sroettger / js_sandbox.js
Created April 17, 2016 21:09
Exploit for the js_sandbox challenge of Plaid CTF 2016
with (true) {
// f() will allocate a buggy JSArray. The length is set to 24 but the capacity is only 16.
// take a look at JSCreateLowering::ReduceJSCreateArray to see why this is happening
function f(){
var x = 8;
var y = 0xffffffff;
var ind = x & y;
x = 16;
y = 0xffffffff;
var ind2 = ind + (x&y);
@jaybosamiya
jaybosamiya / IDAPython_on_IDADemo.md
Last active November 25, 2023 14:40
How to get IDA Python to work with IDA Demo

How to get IDA Python to work with IDA Demo

Go to the IDAPython binaries page. Download the latest _linux.zip file and extract it. In my case, it was idapython-6.9.0-python2.7-linux.zip. Follow the instructions in its README.txt.

For simplicity, I have copy pasted the relevant portions here:

@Inndy
Inndy / super_decoder.js
Last active October 19, 2021 05:34
Decode jsfuck / aaencode / jjencode
!function () {
var global = this;
var old_eval = global.eval;
var old_const = global.Function.prototype.constructor;
global.Function.prototype.constructor = function (code) {
console.log('Function Constructor: ' + code);
return old_const(code);
};
global.eval = function (code) {
console.log('EVIL: ' + code);
@jaybosamiya
jaybosamiya / io_netgarage_level9.md
Last active December 20, 2016 16:45
IO Netgarage Level9 Explanation

IO Netgarage Level9 (Format String Vuln Exploit) Explanation

The vulnerable code

Here's the vulnerable code (/levels/level09.c):

#include <stdio.h>
#include <string.h>
@mubix
mubix / infosec_newbie.md
Last active July 4, 2024 21:11
How to start in Infosec