This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
barriosj@ThinkPad-W530 [02:13:51 PM] [~/hobbes/build] [hc *] | |
-> % gcc ./../out.s -L../lib/hobbes/ -lhobbes | |
/tmp/cc7Ux2hL.o: In function `bvPrintT': | |
out.ll:(.text+0x8ee): undefined reference to `putStr' | |
/tmp/cc7Ux2hL.o: In function `runLongDFA': | |
out.ll:(.text+0xccc): undefined reference to `.failvarmatch' | |
/tmp/cc7Ux2hL.o: In function `.show.t7179': | |
out.ll:(.text+0xd53): undefined reference to `floatFormatConfig' | |
/tmp/cc7Ux2hL.o: In function `.show.t7186': | |
out.ll:(.text+0xd73): undefined reference to `floatFormatConfig' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instrument binaries, pgo data to /data/pgo, serial make is important to not confuse the pgo generator | |
env CXXFLAGS='-march=native -fprofile-dir=/data/pgo -fprofile-generate=/data/pgo' cmake .. -DCMAKE_BUILD_TYPE=Release | |
make -j 1 | |
# Run instrumented program, generate and write pgo data | |
./runIt | |
# Use profile data and feed into gcc, correct for threading counter noise, serial make is important to not confuse the pgo generator | |
env CXXFLAGS='-march=native -fprofile-dir=/data/pgo -fprofile-use=/data/pgo -fprofile-correction' cmake .. -DCMAKE_BUILD_TYPE=Release | |
make -j 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p /home/barriosj/rumprun/./obj-amd64-hw/platform/arch/amd64 | |
mkdir -p /home/barriosj/rumprun/./obj-amd64-hw/platform/arch/x86 | |
( cd /home/barriosj/rumprun/lib/libbmk_core && /home/barriosj/rumprun/./obj-amd64-hw/rumptools/rumpmake MAKEOBJDIR=/home/barriosj/rumprun/./obj-amd64-hw/lib/libbmk_core obj && /home/barriosj/rumprun/./obj-amd64-hw/rumptools/rumpmake MAKEOBJDIR=/home/barriosj/rumprun/./obj-amd64-hw/lib/libbmk_core includes && /home/barriosj/rumprun/./obj-amd64-hw/rumptools/rumpmake BMKHEADERS=/home/barriosj/rumprun/./obj-amd64-hw/include MAKEOBJDIR=/home/barriosj/rumprun/./obj-amd64-hw/lib/libbmk_core dependall ) | |
( cd /home/barriosj/rumprun/lib/libbmk_rumpuser && /home/barriosj/rumprun/./obj-amd64-hw/rumptools/rumpmake MAKEOBJDIR=/home/barriosj/rumprun/./obj-amd64-hw/lib/libbmk_rumpuser obj && /home/barriosj/rumprun/./obj-amd64-hw/rumptools/rumpmake MAKEOBJDIR=/home/barriosj/rumprun/./obj-amd64-hw/lib/libbmk_rumpuser includes && /home/barriosj/rumprun/./obj-amd64-hw/rumptools/rumpmake BMKHEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
#include <sys/time.h> | |
#ifdef __MACH__ | |
#include <mach/clock.h> | |
#include <mach/mach.h> | |
#endif | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//compile this file with gcc 6.2 or greater | |
#include <iostream> | |
#include <string> | |
#include <locale> | |
#include <vector> | |
#include <cassert> | |
#include <list> | |
using namespace std::literals; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
class Netcat: | |
""" Python 'netcat like' module """ | |
def __init__(self, ip, port): | |
self.buff = "" | |
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import logging.handlers | |
class TlsSMTPHandler(logging.handlers.SMTPHandler): | |
def emit(self, record): | |
""" | |
Emit a record. | |
Format the record and send it to the specified addressees. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import logging.handlers | |
smtp_handler = logging.handlers.SMTPHandler(mailhost=("smtp.example.com", 25), | |
fromaddr="[email protected]", | |
toaddrs="[email protected]", | |
subject=u"AppName error!") | |
logger = logging.getLogger() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Vadim Zaliva [email protected] | |
# based on https://gist.github.com/hadess/6847281 | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |