Re-run the last command with root privilege.
alias please='sudo $(history -p !!)'
Re-run the last command saying yes to all interactive questions.
alias really='yes | $(history -p !!)'
#!/usr/bin/python3 | |
# Aloof.py | |
# Created by Matthew Cole on 3/1/15. | |
""" | |
A word is ALOOF if and only if it has no words which differ from it by only one letter. | |
""" | |
def LDistance(str1, str2): | |
""" |
#!/usr/bin/python3 | |
""" | |
File: partition.py | |
Author: Matthew Cole | |
Date: 6/7/16 | |
""" | |
def partition(collection, partitions): | |
""" |
#!/usr/bin/env python3 | |
""" | |
File: python-check.py | |
Author: Matthew Cole | |
Date: 28 Nov 2016 | |
""" | |
import sys, os | |
if __name__ == "__main__": |
Line 1 | |
Line 2 | |
Line 3 |
import argparse | |
import subprocess | |
import sys | |
""" | |
Run a command and its arguments as a subprocess of the python interpreter. | |
""" | |
if __name__ == "__main__": |
PWD := $(shell pwd) | |
CFLAGS := -g -Wall | |
LDFLAGS := -L=. -Wl,-rpath=. | |
all: tss-fork | |
tss-fork: tss-fork.c | |
$(CC) $(CFLAGS) tss-fork.c -o tss-fork -pthread | |
.PHONY: clean |
Re-run the last command with root privilege.
alias please='sudo $(history -p !!)'
Re-run the last command saying yes to all interactive questions.
alias really='yes | $(history -p !!)'
CFLAGS:= -g -Wall -std=c99 | |
LDFLAGS:= -lc | |
all: main | |
main: main.c | |
$(CC) $(CFLAGS) $^ -o $@ | |
.PHONY: clean | |
clean: | |
rm -fv main |
You may want to build a sandbox if one or more of these sound familiar:
strict_rundir_verify=no
option in your configuration file, or if you create a modified installation of the benchmark using the convert_to_development
utility. But an easier option is to create sandboxes for each benchmark program you wish to investigate, and it doesn't corrupt the source tree if you're reusing it with other experiments.Suppose you need to add a section to an ELF binary to contain information gathered at compile time, but to be used at link time or run time. Here's how to add a section named .okdata
and either populate it with data either after or before emitting the ELF binary.
In this case, you'll add file’s contents to an already existing binary. objcopy
copies and translates object files, such that adding a new section is a matter of writing that new section’s contents into the ELF file.
(Optional) Create a simple program’s object file.