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
#!/usr/bin/python | |
# Invoke n instances of sudo in parallel. This works fine in all machines I've | |
# tried this on, except Windows Azure VMs, where occasionally invocations to | |
# sudo take ~5s to complete when n > 1. | |
# Tested on a Standard_A1 instance w/Ubuntu Utopic, kernel 3.16.0-34-generic. | |
import subprocess | |
import sys | |
import time |
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
#!/usr/bin/python | |
# vim: set expandtab:ts=2:sw=2 | |
import argparse | |
import bluetooth | |
import struct | |
import sys | |
def checksum(msg): | |
checksum = 0 |
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
#!/usr/bin/python | |
import argparse | |
import random | |
import subprocess | |
import sys | |
import time | |
PREFIX = '/sbin/ip netns exec' |
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
#!/usr/bin/python | |
import argparse | |
import collections | |
import os | |
import os.path | |
import re | |
import subprocess | |
import sys | |
import threading |
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 | |
set +x | |
sudo apt-get install -y autoconf automake binutils-dev build-essential cmake g++-4.9 gawk git \ | |
libbz2-dev libc-client-dev libldap2-dev \ | |
libc-client2007e-dev libcap-dev libcurl4-openssl-dev libdwarf-dev libelf-dev \ | |
libexpat-dev libgd2-xpm-dev libgoogle-perftools-dev libicu-dev \ | |
libjemalloc-dev libmcrypt-dev libmemcached-dev libmysqlclient-dev libncurses-dev \ | |
libonig-dev libpcre3-dev libreadline-dev libtbb-dev libtool libxml2-dev zlib1g-dev \ |
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
#!/usr/bin/python3 | |
from Crypto.Signature import PKCS1_v1_5 | |
from Crypto.PublicKey import RSA | |
import argparse | |
import socket | |
import struct | |
import sys | |
ADB_AUTH_TOKEN = 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
// Benchmark Time CPU Iterations | |
// ----------------------------------------------------- | |
// BM_DynamicCast 1073 ns 1074 ns 630631 | |
// BM_StaticCast 452 ns 452 ns 1552106 | |
// BM_TaggedCast 59 ns 59 ns 11111111 | |
#include <assert.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <benchmark/benchmark.h> |
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 "clang/AST/ASTConsumer.h" | |
#include "clang/AST/DeclCXX.h" | |
#include "clang/AST/RecursiveASTVisitor.h" | |
#include "clang/Frontend/CompilerInstance.h" | |
#include "clang/Frontend/FrontendActions.h" | |
#include "clang/Lex/Preprocessor.h" | |
#include "clang/Tooling/CommonOptionsParser.h" | |
#include "clang/Tooling/Tooling.h" | |
#include "llvm/Support/CommandLine.h" | |
#include "llvm/Support/Path.h" |
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 <dirent.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <getopt.h> | |
#include <signal.h> | |
#include <stdarg.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/mount.h> |
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 <errno.h> | |
#include <fcntl.h> | |
#include <linux/usb/ch9.h> | |
#include <linux/usbdevice_fs.h> | |
#include <sys/ioctl.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <cstdio> | |
#include <iostream> |