Skip to content

Instantly share code, notes, and snippets.

View md_created.py
#!/usr/bin/python
import sys
from collections import namedtuple
from datetime import datetime
from struct import Struct
MDRawHeader = namedtuple("MDRawHeader", "signature version stream_count \
stream_directory_rva checksum time_date_stamp flags")
@lekv
lekv / instances_preview.png
Last active Dec 5, 2017
Preview for IMPALA-6190/IMPALA-6246
View instances_preview.png
Query (id=7a4b153d9175fa9a:ab326f0d00000000):
DEBUG MODE WARNING: Query profile created while running a DEBUG build of Impala. Use RELEASE builds to measure query performance.
Summary:
Session ID: 324dcca803f2fbf5:7a6bf3b925f397a3
Session Type: BEESWAX
Start Time: 2017-12-04 16:46:45.530864000
End Time:
Query Type: QUERY
Query State: RUNNING
Query Status: OK
View main.cpp
#include <iostream>
#include <dirent.h>
#include <thread>
// Prepare: mkdir d; cd d; touch {0001.1000}
// Build with: g++ --std=c++11 -pthread -o main main.cpp
using namespace std;
int num_files(DIR* dir_stream) {
@lekv
lekv / appify
Created Mar 22, 2017 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
View appify
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh