Skip to content

Instantly share code, notes, and snippets.

def mkhash(filelist)
hash = Hash.new()
hash.default = []
filelist.each do |path|
File.open(path) do |f|
tmp = f.read
hash[tmp].push(path)
end
end
return hash
@Aenigma
Aenigma / Makefile
Created April 15, 2014 07:05
Simple buffer overflow example program
CC:=$(shell which cc)
CC_WIN_32:=$(shell which i686-w64-mingw32-gcc)
CC_WIN_64:=$(shell which x86_64-w64-mingw32-gcc)
CFLAGS=
DEFINES=-DDEBUG
CFILES=example.c
OUTPUT=example
BIN_DIR=bin
# This is a GNU Make file which describes how to build the application's
# DLL/SO for both x86 Windows and Linux systems.
#
#
# To do a full compile, invoke 'make all'
# To build just the test executable, invoke 'make bins'
#
CC:=$(shell which cc)
CFLAGS=-Wall -pedantic -O3 -std=c99
#!/usr/bin/env ruby
REGEX = %r{TRP.*(\d{2}\/\d{2}\/\d{4} \d{2}:\d{2}:\d{2}).*(\d{2}\/\d{2}\/\d{4} \d{2}:\d{2}:\d{2}).*(\d{2}:\d{2}:\d{2}).*(\d{4}\.\d{2}\.\d{2}\.\d{2}\.\d{2}\.\d{2})}
abort "You must enter file paths via CLI" unless ARGV.length > 0
ARGV.each do |file_path|
File.open(file_path, "rb") do |f|
results = f.read.scan(REGEX)
if results.length != 1
public class MethodOverriding {
interface A {
default void foo() {
System.out.println("Foo: A");
}
}
interface B extends A {
@Override
default void foo() {
function Read-CVE() {
$file = "data.csv"
Import-Csv $file | ForEach-Object {
Write-Host "OR [CVE]='$($_."CVE #")'"
}
}
function ReDo-Dates() {
$file = "results.csv"
Import-Csv $file | ForEach-Object {

Installing RVM and Ruby

If you're on a Debian based installation, before you install rvm, you need to install a system Ruby and then install build-essentials.

So, to install some requirements, run:

# aptitude update
# aptitude upgrade
# aptitude install ruby build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
@Aenigma
Aenigma / 2014-09-04.md
Last active August 29, 2015 14:06
COSC335 Notes

COSC 335 2014-09-04 Notes

Network Architecture

  • Network edge
    • hosts: clients and servers
    • servers often in data centers
  • Access networks
    • physical media
    • wired
    • wireless
    • communication links
@Aenigma
Aenigma / .gitignore
Last active October 19, 2017 01:10
Constitution for the FSU Computer Club
build/
/*
* Copyright 2014 Kevin Raoofi.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software