Skip to content

Instantly share code, notes, and snippets.

View farhaven's full-sized avatar
🦄
I'm a unicorn.

Gregor Best farhaven

🦄
I'm a unicorn.
View GitHub Profile
from __future__ import print_function, unicode_literals
import time
from scapy.all import ARP, Ether, sendp
def create_ARP(mac='f0:fe:6b:1e:4b:27', ip_addr='10.10.100.254'):
BCAST = ':'.join(['ff'] * 6)
print("Bcast", BCAST)
#!/usr/local/bin/python2.7
from __future__ import print_function, unicode_literals
import gdb
import re
def backtrace():
""" Generates stack frames until none is available """
frame = gdb.newest_frame()
#!/bin/ksh
# Place sets in ~/.config/clipstuff/$NAME
# Sets are lines of
# name | item
# item will be placed in the X-Selection after it's selected with dmenu.
SET="unicode"
if [ $# -gt 0 ]; then
CREATE TABLE events (id INTEGER PRIMARY KEY, timestamp INTEGER, machine STRING);
INSERT INTO events (timestamp, machine) VALUES (123, 'a');
INSERT INTO events (timestamp, machine) VALUES (234, 'a');
INSERT INTO events (timestamp, machine) VALUES (345, 'a');
INSERT INTO events (timestamp, machine) VALUES (456, 'a');
INSERT INTO events (timestamp, machine) VALUES (555, 'b');
INSERT INTO events (timestamp, machine) VALUES (444, 'b');
INSERT INTO events (timestamp, machine) VALUES (333, 'b');
@farhaven
farhaven / Output
Created February 1, 2019 10:33 — forked from macournoyer/Output
A Neural Network framework in 25 LOC
$ python xor.py
Training:
Epoch 0 MSE: 1.765
Epoch 100 MSE: 0.015
Epoch 200 MSE: 0.005
* Target MSE reached *
Evaluating:
1 XOR 0 = 1 ( 0.904) Error: 0.096
0 XOR 1 = 1 ( 0.908) Error: 0.092
1 XOR 1 = 0 (-0.008) Error: 0.008
# /etc/bgp/rappet.conf
group "rappet" {
remote-as 4242423889
announce all
neighbor "100.64.0.2" {
descr "rappet-4"
}
}
# /etc/hostname.tun19
description "DN42 uplink to rappet"
group dn42uplink
!(cd /dev; sh MAKEDEV \$if)
!/usr/local/sbin/openvpn --config /etc/openvpn/dn42-rappet/config --daemon dn42-rappet-uplink &
Using /home/gbe/chaos/ansible/ansible.cfg as config file
statically included: /home/gbe/chaos/ansible/roles/letsencrypt/tasks/systemd.yml
statically included: /home/gbe/chaos/ansible/roles/letsencrypt/tasks/cronjob.yml
PLAYBOOK: playbook-broken.yml ***************************************************************************************************************************************************************************************************************************************************
1 plays in playbook-broken.yml
PLAY [oldshit] ******************************************************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************
config {
# hostname mirror.osn.de
hostname anoncvs.eu.openbsd.org
collection {
name openbsd-cvsroot
release rcs
prefix /home/cvs
umask 002
}
collection {
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>