Skip to content

Instantly share code, notes, and snippets.

View vmayoral's full-sized avatar

Víctor Mayoral Vilches vmayoral

View GitHub Profile
@MarkBaggett
MarkBaggett / scapy_helper.py
Last active March 25, 2024 21:59
Python - SCAPY - Full Packet Session Reassembly
#From here https://pen-testing.sans.org/blog/2017/10/13/scapy-full-duplex-stream-reassembly
def full_duplex(p):
sess = "Other"
if 'Ether' in p:
if 'IP' in p:
if 'TCP' in p:
sess = str(sorted(["TCP", p[IP].src, p[TCP].sport, p[IP].dst, p[TCP].dport],key=str))
elif 'UDP' in p:
sess = str(sorted(["UDP", p[IP].src, p[UDP].sport, p[IP].dst, p[UDP].dport] ,key=str))
@wingedsheep
wingedsheep / cartpole_runnner.py
Created May 21, 2016 14:29
Q learning cartpole with target network and experience replay
# import the gym stuff
import gym
# import other stuff
import random
import numpy as np
# import own classes
from deepq import DeepQ
env = gym.make('CartPole-v0')
@squarism
squarism / iterm2.md
Last active October 18, 2024 07:43
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active October 11, 2024 20:24
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@jetsonhacks
jetsonhacks / createSwapfile.sh
Created October 4, 2014 21:19
Create a Swapfile
#!/bin/bash
#NVIDIA Jetson TK1
#Create a swapfile for Ubuntu at the current directory location
fallocate -l 4G swapfile
#List out the file
ls -lh swapfile
# Change permissions so that only root can use it
chmod 600 swapfile
#List out the file
ls -lh swapfile
@steakunderscore
steakunderscore / arm-eabi-gcc_on_ubuntu.markdown
Created June 30, 2011 00:27 — forked from Nemo157/arm-eabi-gcc_on_osx.markdown
How I installed arm-eabi-gcc on Ubuntu 11.04

Install some needed libraries

sudo aptitude install libmpc-dev

Make the temp directory to build in

mkdir toolchain
cd toolchain

Get the required sources