This file contains 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 <memory> | |
#include <thread> | |
#include <benchmark/benchmark.h> | |
void f1(bool shouldMallocInLoop) | |
{ | |
auto n = 0; | |
void *c = nullptr; | |
for (int i = 0; i < 10; ++i) { | |
if (shouldMallocInLoop) |
This file contains 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
version: '2' | |
networks: | |
consul_net: | |
driver: bridge | |
ipam: | |
driver: default | |
config: | |
- | |
subnet: 172.16.238.0/24 |
This file contains 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
version: '2' | |
networks: | |
consul_net: | |
driver: bridge | |
ipam: | |
driver: default | |
config: | |
- | |
subnet: 172.16.238.0/24 |
This file contains 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
https://github.com/kubernetes/minikube | |
To get it running behind the a proxy you need to setup things a bit differently from the documentation | |
1. Ensure that the proxy is passed into the VM that is created by minikube (this ensures that the docker daemon within the VM can get out to the internet) | |
minikube start --vm-driver="kvm" --docker-env="http_proxy=xxx" --docker-env="https_proxy=yyy" start | |
2. Get the IP that the VM gets |
This file contains 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 <iostream> | |
#include <fstream> | |
#include <sstream> | |
#include <stdexcept> | |
#include <map> | |
#include <regex> | |
#include <set> | |
#include <cmath> | |
This file contains 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 cProfile | |
import re | |
import math | |
import string | |
import sys | |
def read_file(filename): | |
""" | |
Read the text file with the given filename; | |
return a list of the lines of text in the file. |
This file contains 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
# docdist1.py | |
# Author: Ronald L. Rivest | |
# Date Last Modified: February 14, 2007 | |
# Changelog: | |
# Version 1: | |
# Initial version | |
# | |
# Usage: | |
# docdist1.py filename1 filename2 | |
# |
This file contains 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
elf-tag $ readelf -p BuildTags a.out | |
readelf: Warning: Section 'BuildTags' was not dumped because it does not exist! | |
elf-tag $ ./tag.sh -u "osada" -g "git-describe-string" -v "0.02" a.out | |
elf-tag $ readelf -p BuildTags a.out.new | |
String dump of section 'BuildTags': | |
[ 0] BuildTags ver0.1 |
This file contains 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 | |
date_format_str="" | |
git_describe="" | |
user_name="" | |
version_str="" | |
while getopts "d:g:u:v:h?" opt; do | |
case "$opt" in | |
d) |
This file contains 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 <elfio/elfio.hpp> | |
#include <libxml/parser.h> | |
#include <libxml/tree.h> | |
#include <iostream> | |
#include <time.h> | |
#include <string.h> | |
using namespace ELFIO; | |
static const char* xmlConfigFile = "buildtag.xml"; |
NewerOlder