Skip to content

Instantly share code, notes, and snippets.

View mluis's full-sized avatar
🖖
SYN ACK

Miguel Luís mluis

🖖
SYN ACK
View GitHub Profile
@mluis
mluis / gifjs.asm
Created August 10, 2017 02:42 — forked from ajinabraham/gifjs.asm
A Valid GIF and JS file
; a hand-made GIF containing valid JavaScript code
; abusing header to start a JavaScript comment
; inspired by Saumil Shah's Deadly Pixels presentation
; Ange Albertini, BSD Licence 2013
; yamal gifjs.asm -o img.gif
WIDTH equ 10799 ; equivalent to 2f2a, which is '/*' in ASCII, thus starting an opening comment
@mluis
mluis / README.md
Created August 10, 2017 02:37 — forked from mildsunrise/README.md
Helper program to add HTTP/SOCKS proxy support to SSH

ssh-proxy-dialer

This program adds proxy support to ssh. Once installed, ssh will obey the ssh_proxy environment variable (or all_proxy as a fallback) and will try to connect to the server through that proxy. Example:

export ssh_proxy="socks5://10.139.2.1:8066"
ssh example.com  # will connect through SOCKS5 proxy
@mluis
mluis / README.md
Created August 10, 2017 02:37
Wrapper that simplifies SSH tunnels

ssh-from

ssh-from simplifies common usage of SSH tunnels, and makes double (or triple) tunnels a piece of cake.
Here is an example, where I SSH to a computer that is behind two NATs, tunneling through each router:

Double tunnel example

Details coming to the blog soon.

Installation

@mluis
mluis / careers.hotjar.com.js
Created May 8, 2017 17:58
You have an array of objects in JS, each containing a name, age and gender. Write a function which returns all males between 30 and 40 years old.
let f = (...args) => args[0].filter(p => p.gender == "male" && p.age > 30 && p.age < 40)
/*
Example:
const ppl = [ {"name":"Dr David Darmanin","age": 31, "gender": "male"},
{"name":"Diana De Jesus","age": 32, "gender": "female"},
{"name":"Marc von Brockdorff ","age": 33, "gender": "male"},
{"name":"Christian Nussbaumer ","age": 29, "gender": "male"},
{"name":"Erik Näslund","age": 35, "gender": "male"},
{"name":"Shira Harash","age": 41, "gender": "female"},
#!/usr/bin/env python
import multiprocessing
import imp
import urllib2
import urlparse
urllib = imp.new_module('urllib')
urllib.error = urllib2
urllib.parse = urlparse
urllib.request = urllib2