~ hiroki.yagita(HirokinoMacBook-Pro) ✅
% hdiutil attach -nomount ram://2097152 3 19 月 14:01 JST
/dev/disk2
~ 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
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 <stdio.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
const char *files[] = { | |
"/usr/share/dict/american-english", |
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/ruby | |
# | |
# indent.rb PATH | |
# -> PATH.new というインデント済みのファイルが生成されます。 | |
# | |
require "stringio" | |
out = StringIO.new | |
File.foreach(ARGV[0]) do |line| |
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
// | |
// HttpConnectionWrapper.h | |
// | |
// Created by Hiroki Yagita on 11/04/09. | |
// Copyright 2011 Hiroki Yagita. All rights reserved. | |
// | |
/*! @file */ | |
#import <Foundation/Foundation.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
[user] | |
name = Hiroki Yagita | |
email = yagihiro@gmail.com | |
[color] | |
ui = auto | |
[alias] | |
a = add | |
b = branch -a | |
bs = branch --sort=-authordate | |
co = checkout |
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
/* | |
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 |
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
# 最初にスケジュール済みのジョブを削除する | |
Sidekiq::ScheduledSet.new.each do |e| | |
if e.item[‘wrapped’] == self.class.to_s | |
e.delete | |
end | |
end | |
# もろもろ処理 | |
# 最後に reschedule する |
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
use GuzzleHttp\Client as Guzzle; | |
// ... | |
if ($request->has('code')) { | |
$params = $request->all(); | |
$g = new Guzzle; | |
$postParams = [ | |
'form_params' => [ |
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
package main | |
import ( | |
"context" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" | |
"time" |