The first portion of any ELF file is the ELF header. This generally provides offsets to other headers (program headers and section headers) within an ELF.
typedef struct {
unsigned char e_ident[EI_NIDENT];
uint16_t e_type;
#define _GNU_SOURCE | |
#include <asm/bootparam.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <linux/kvm.h> | |
#include <linux/kvm_para.h> | |
#include <stdarg.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
<textarea style="height: 100%; width: 100%; background: #222; padding: 5% 25%; color: #eee;"></textarea> |
#!/bin/sh | |
# Usage: . testlib.sh | |
# Simple shell command language test library. | |
# | |
# Tests must follow the basic form: | |
# | |
# begin_test "the thing" | |
# ( | |
# set -e | |
# echo "hello" |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
require 'minitest/unit' | |
require 'drb' | |
require 'rinda/tuplespace' | |
module MiniTest | |
class ParallelRunner < MiniTest::Unit | |
URI = 'druby://127.0.0.1:12345' | |
def _run_suites suites, type | |
hash = Hash[suites.map { |s| [s.name, s] }] |
Blog post here
# Public: generates a mixable singleton implementation dependent on a model key. | |
# Once you mix it into a model, your model gains an .instance method that will | |
# generate an object and cache it. Further calls to the .instance methods will | |
# return the same object. | |
# | |
# key - The name of the attribute we use to index instances. Defaults to "id". | |
# | |
# Example | |
# | |
# # Called without arguments uses the "id" as key. |
bash -c ' | |
<% if knife_config[:bootstrap_proxy] -%> | |
( | |
cat <<'EOP' | |
<%= "proxy = #{knife_config[:bootstrap_proxy]}" %> | |
EOP | |
) > ~/.curlrc | |
<% end -%> | |
if [ ! -f /usr/bin/chef-client ]; then |
By Christopher Walken
Do you enjoy eating hot dogs? I hope you won’t be put off by my frankness when I tell you that I absolutely love them. In fact, I enjoy no food item more than a freshly-boiled hot dog. Now, I’ve done a lot of movies, and it’s true that I’ve worked with quite a few celebrities who did not share this opinion. I’m sorry to say that these people have always angered me.
There are two types of people in this world: those who eat hot dogs whenever it is possible to do so, and those who opt to do other things with their free time. Who do the latter think they are kidding? What pastime could be more rewarding than the consumption of hot dogs? I haven’t yet found one, and I don’t expect to in my lifetime. Unlike other foods, hot dogs can be eaten at any time, in any place, and it is not necessary to cook them. Now, I ask you: Why not eat hot dogs? They are delicious.
I carry a bag of hot dogs with me wherever I go. I eat them from the bag whenever I get the urge, regardless of the circumstances