Skip to content

Instantly share code, notes, and snippets.

View moshohayeb's full-sized avatar

Mohammed Alshohayeb moshohayeb

  • Riyadh, Saudi Arabia
View GitHub Profile
@moshohayeb
moshohayeb / fixcsum.py
Last active March 18, 2020 10:28
Recalculate pcap ipv4 header checksum
#!/usr/bin/env python3
import sys
from scapy.all import *
def fix(infile, outfile):
i = 0
# packets = rdpcap(infile)
fp = PcapWriter(outfile, append=True, sync=True)
for p in PcapReader(infile):
@moshohayeb
moshohayeb / vimium
Created November 17, 2019 06:47
vimium settings
map a goBack
map d goForward
map l nextTab
map h previousTab
map <c-f> scrollPageDown
map <c-b> scrollPageUp
map t visitPreviousTab
map <space> Vomnibar.activateTabSelection
#!/bin/bash
# USE Ubuntu 18.11 for path of least resistance
TARGETDIR=$1
if [ "$TARGETDIR" = "" ]; then
TARGETDIR=/root/local
fi
mkdir -p $TARGETDIR
@moshohayeb
moshohayeb / surfingkeys.js
Last active November 6, 2019 06:21
SurfingKeys
// an example to create a new mapping `ctrl-y`
mapkey('<Ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
map('gt', 'T');
// an example to remove mapkey `Ctrl-i`
unmap('<Ctrl-i>');
@moshohayeb
moshohayeb / cvim
Last active October 4, 2018 07:24
set smoothscroll
set autoupdategist
let scrollstep = 70
let scrollduration = 250
let scalehints = 1
let mapleader = "<Space>"
let qmark a = ["http://www.reddit.com", "http://www.google.com", "http://twitter.com"]
let blacklists = ["*://*.youtube.com/*"]
map ; :
map : ;
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@moshohayeb
moshohayeb / npm search engines
Last active August 29, 2015 14:21
NPM Seach
https://nodejsmodules.org/
http://eirikb.github.io/nipster/
http://node-modules.com/
http://browsenpm.org/
http://npmsearch.com/