Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
from scapy.all import *
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("-f", "--file", dest="filename", required=True,
help="pcap file to analyze", metavar="FILE")
args = parser.parse_args()

Keybase proof

I hereby claim:

  • I am nkauppila on github.
  • I am nkauppila (https://keybase.io/nkauppila) on keybase.
  • I have a public key ASDGZrdtPzDAeGiu1nkVFvj2BL706P125UGxvUYbhfDXcAo

To claim this, I am signing this object:

@engineergiraffe
engineergiraffe / button.exs
Last active November 25, 2015 06:08
Meetup 6
defmodule Pin do
def export_gpio(value) do
"/sys/class/gpio/export" |> File.write(Integer.to_string(value))
value
end
def gpio_up(pin), do: set_gpio_value(pin, "1")
def gpio_down(pin), do: set_gpio_value(pin, "0")
def gpio_in(pin), do: set_gpio_direction(pin, "in")
def gpio_out(pin), do: set_gpio_direction(pin, "out")
@engineergiraffe
engineergiraffe / 0_reuse_code.js
Created November 6, 2015 15:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@engineergiraffe
engineergiraffe / index.html
Created August 16, 2015 14:43
React + Reflux testing
<html>
<head>
<title>asdasdasd</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.1.10/es5-shim.js"></script>
<script src="https://cdn.jsdelivr.net/refluxjs/0.2.11/reflux.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/superagent/1.2.0/superagent.js"></script>
</head>
<body>
tr -dc A-Za-z0-9 < /dev/urandom|head -c 10M > file.txt
awful.key({ modkey }, "s",
function ()
local clients = { }
for i = 1,screen.count(),1 do
clients[i] = awful.client.tiled(i)
end
for s, ct in pairs(clients) do
for i, c in pairs(ct) do
awful.client.movetoscreen(c)
end
#!/bin/bash
BACKUP_DIRS=("/home/niko/" "/etc/")
DEST="/media/backup"
EXCLUDE_LIST="/home/niko/bin/backup-exclude.txt"
WRITE_LOG=true
BACKUP_SOFWARE_LIST=true
DEST=$(echo $DEST |sed -e "s/\/$//") #remove possible trailing backslash.
function get_screenshot_from_client(show, awful)
math.randomseed(os.time())
local image_viewer = "/usr/bin/gthumb"
local image_name = "awesome-" .. math.random(0, 10000) .. ".png"
local image_path = "/tmp/" .. image_name
local command = image_viewer .. " " .. image_path
client.focus.content:save(image_path)
if show then awful.util.spawn(command) end
end