Skip to content

Instantly share code, notes, and snippets.

View moriyoshi's full-sized avatar
😎
I do what to do.

Moriyoshi Koizumi moriyoshi

😎
I do what to do.
View GitHub Profile
@moriyoshi
moriyoshi / test.m
Last active August 29, 2015 14:16 — forked from shibukawa/test.m
#import <Foundation/Foundation.h>
BOOL shouldKeepRunning = YES;
int main(int argc, char *argv[]) {
@autoreleasepool {
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://www.example.com/"]];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask* task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
@moriyoshi
moriyoshi / calcpull.py
Created March 28, 2012 05:36 — forked from ymotongpoo/calcpull.py
ZeroMQ PUSH/PULL sample implementation (no collector)
import zmq
import sys
import time
cxt = zmq.Context()
receiver = cxt.socket(zmq.PULL)
receiver.connect("tcp://127.0.0.1:5555")
sum = 0
while True:
ifneq ($(KERNELRELEASE),)
obj-m := my_vfs.o
my_vfs-objs := my_vfs_module.o
else
KVER = $(shell uname -r)
KDIR = /lib/modules/$(KVER)/build
modules::
$(MAKE) -C $(KDIR) M=$(shell pwd) modules