Skip to content

Instantly share code, notes, and snippets.

Hiroki Yagita yagihiro

Block or report user

Report or block yagihiro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
yagihiro / gist:31f55f08200de13377f1d66f4c9be8e1
Created Mar 19, 2018
Create ramdisk on mac os high sierra
View gist:31f55f08200de13377f1d66f4c9be8e1
~ hiroki.yagita(HirokinoMacBook-Pro) ✅
% hdiutil attach -nomount ram://2097152                                                                                                                                                                                                                       3 19 月 14:01 JST
~ hiroki.yagita(HirokinoMacBook-Pro) ✅
% diskutil partitionDisk /dev/disk2 1 apfs test 1G                                                                                                                                                                                                            3 19 月 14:02 JST
Started partitioning on disk2
Unmounting disk
Creating the partition map
Waiting for partitions to activate
yagihiro / main.go
Created Mar 12, 2018
Minimal gin application
View main.go
package main
import (
yagihiro / WKNavigationDelegate+Rx.swift
Created Apr 29, 2016
View WKNavigationDelegate+Rx.swift
import Foundation
import RxSwift
import RxCocoa
import WebKit
class WKNavigationDelegateProxy: DelegateProxy, WKNavigationDelegate, DelegateProxyType {
static func currentDelegateFor(object: AnyObject) -> AnyObject? {
let webView: WKWebView = object as! WKWebView
return webView.navigationDelegate
yagihiro / instagram_oauth_token_request_sample.php
Created Jan 25, 2016
View instagram_oauth_token_request_sample.php
use GuzzleHttp\Client as Guzzle;
// ...
if ($request->has('code')) {
$params = $request->all();
$g = new Guzzle;
$postParams = [
'form_params' => [
yagihiro / reschedulable_sidekiq.rb
Created Jan 19, 2016
Sidekiq を re-schedulable にするスニペット
View reschedulable_sidekiq.rb
# 最初にスケジュール済みのジョブを削除する do |e|
if e.item[‘wrapped’] == self.class.to_s
# もろもろ処理
# 最後に reschedule する
yagihiro / simple_concurrent_queue.h
Last active Dec 2, 2015
A queue implementation with concurrency for C++11
View simple_concurrent_queue.h
The MIT License (MIT)
Copyright (c) 2015 Hiroki Yagita
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
View .gitconfig
name = Hiroki Yagita
email =
ui = auto
a = add
b = branch -a
bs = branch --sort=-authordate
co = checkout
yagihiro / HttpConnectionWrapper.h
Created Apr 10, 2011
Objective-C で簡単に HTTP 通信を取り扱うことができるようにするクラス
View HttpConnectionWrapper.h
// HttpConnectionWrapper.h
// Created by Hiroki Yagita on 11/04/09.
// Copyright 2011 Hiroki Yagita. All rights reserved.
/*! @file */
#import <Foundation/Foundation.h>
yagihiro / indent.rb
Created Mar 1, 2011
簡易インデントツール (space 4つを tab 1つへ)
View indent.rb
# indent.rb PATH
# -> というインデント済みのファイルが生成されます。
require "stringio"
out =
File.foreach(ARGV[0]) do |line|
yagihiro / sample.c
Last active Sep 9, 2016
mmap(2) / read(2) system call sample
View sample.c
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdlib.h>
const char *files[] = {
You can’t perform that action at this time.