Skip to content

Instantly share code, notes, and snippets.

View mitake's full-sized avatar
💭
I may be slow to respond.

Hitoshi Mitake mitake

💭
I may be slow to respond.
  • 05:33 (UTC +09:00)
View GitHub Profile
@mitake
mitake / ncdc.sh
Created December 12, 2018 01:37 — forked from schnell18/ncdc.sh
Download a weather dataset from the National Climatic Data Center (NCDC, http://www .ncdc.noaa.gov/). Prepare it for examples of "Hadoop: The Definitive Guide" book by Tom White. http://www.amazon.com/Hadoop-Definitive-Guide-Tom-White/dp/1449311520 Usage: ./ncdc.sh 1901 1930 # download wheather datasets for period from 1901 to 1930.
#!/usr/bin/env bash
# global parameters
g_tmp_folder="ncdc_tmp";
g_output_folder="ncdc_data";
g_remote_host="ftp3.ncdc.noaa.gov";
g_remote_path="pub/data/noaa";

Reference Getting Started with runC

mkdir runc
cd runc
docker pull busybox
docker export $(docker create busybox) > busybox.tar
mkdir rootfs
tar -C rootfs -xf busybox.tar
runc spec > container.json
sudo runc
@mitake
mitake / patch-3.5.0-bvt1
Created March 7, 2016 05:54 — forked from leverich/patch-3.5.0-bvt1
Borrowed Virtual Time patch against Linux 3.5.0
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4a1f493..ef258ef 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1179,6 +1179,10 @@ struct sched_entity {
u64 exec_start;
u64 sum_exec_runtime;
u64 vruntime;
+#ifdef CONFIG_CFS_BVT
+ u64 effective_vruntime;
@mitake
mitake / idea
Last active September 4, 2015 02:24 — forked from chrisdarroch/idea
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=/opt/intellij-idea-ce/bin/idea.sh
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@mitake
mitake / evhttp-multh-thread-httpd.cpp
Created November 5, 2012 07:10 — forked from kzk/evhttp-multh-thread-httpd.cpp
Multi-Threaded HTTPServer using evhttp
// g++ evhttp-multh-thread-httpd.cpp -levent
#include <event.h>
#include <evhttp.h>
#include <pthread.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/types.h>