Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from netaddr import iter_nmap_range
if len(sys.argv) < 6:
import json
from time import sleep
from pokemongo_bot.human_behaviour import action_delay
from pokemongo_bot.base_task import BaseTask
class TransferPokemon(BaseTask):
SUPPORTED_TASK_API_VERSION = 1
{
"font_size": 10,
"ignored_packages":
[
"Markdown",
"Vintage"
],
"match_brackets_angle": true,
"translate_tabs_to_spaces": true
}
@mdeous
mdeous / magic_log.py
Last active January 14, 2016 15:55
Logging formatter guessing automagically from where the log call was made
import inspect
import logging
class MagicFormatter(logging.Formatter):
def format(self, record):
# extract frame from which the logging call was made
caller_frame = inspect.stack()[8]
# extract name of module from frame
record.name = inspect.getmodule(caller_frame[0]).__name__

Keybase proof

I hereby claim:

  • I am mattoufoutu on github.
  • I am mattoufoutu (https://keybase.io/mattoufoutu) on keybase.
  • I have a public key whose fingerprint is BF55 8B34 B05C C5EF 56D6 7589 B1D7 E326 13E2 2663

To claim this, I am signing this object:

data = ''
tmp = s.recv(1)
while tmp:
data += tmp
if delim.encode() in tmp:
break
tmp = s.recv(1)
@mdeous
mdeous / ubuntu_grsec.md
Created October 29, 2015 10:57
Ubuntu Grsecurity Kernel

Ubuntu Grsecurity Kernel

  • Ubuntu 14.04 (trusty)
  • Grsecurity 3.1-3.14.54-201510130857

Sources & Dependencies

  • Linux kernel sources and build dependencies
m /usr/lib/xorg-server/Xorg
m /opt/google/chrome/chrome
m /opt/google/chrome/nacl_helper
m /opt/sublime_text_3/sublime_text
r /opt/sublime_text_3/plugin_host
m /usr/lib/gnome-session/gnome-session-binary
m /usr/lib/gnome-session/gnome-session-failed
m /usr/lib/gnome-session/gnome-session-check-accelerated
m /usr/lib/gnome-session/gnome-session-check-accelerated-helper
m /usr/lib/gnome-settings-daemon/gnome-settings-daemon
[core]
editor = vim
excludesfile = ~/.gitignore_global
autocrlf = input
compression = 9
[user]
email = email@example.com
name = MatToufoutu
status = auto
@mdeous
mdeous / gist:2d23143d4939fadd14a3
Created August 11, 2015 12:08
Oracle - No you can't
No, You Really Can’t
By User701213-Oracle on Aug 10, 2015
I have been doing a lot of writing recently. Some of my writing has been with my sister, with whom I write murder mysteries using the nom-de-plume Maddi Davidson. Recently, we’ve been working on short stories, developing a lot of fun new ideas for dispatching people (literarily speaking, though I think about practical applications occasionally when someone tailgates me).
Writing mysteries is a lot more fun than the other type of writing I’ve been doing. Recently, I have seen a large-ish uptick in customers reverse engineering our code to attempt to find security vulnerabilities in it. <Insert big sigh here.> This is why I’ve been writing a lot of letters to customers that start with “hi, howzit, aloha” but end with “please comply with your license agreement and stop reverse engineering our code, already.”