Skip to content

Instantly share code, notes, and snippets.

View umireon's full-sized avatar

Kaito Udagawa umireon

  • Monoxer
  • Tokyo, Japan
  • 13:25 (UTC +09:00)
  • X @umireon
View GitHub Profile
@umireon
umireon / # gitfs - 2016-11-25_21-02-29.txt
Created November 25, 2016 12:03
gitfs (homebrew/fuse/gitfs) on macOS 10.12.1 - Homebrew build logs
Homebrew build logs for homebrew/fuse/gitfs on macOS 10.12.1
Build date: 2016-11-25 21:02:29
@umireon
umireon / # gitfs - 2016-11-25_20-09-56.txt
Created November 25, 2016 11:22
gitfs (homebrew/fuse/gitfs) on macOS 10.12.1 - Homebrew build logs
Homebrew build logs for homebrew/fuse/gitfs on macOS 10.12.1
Build date: 2016-11-25 20:09:56
This file has been truncated, but you can view the full file.
$ ls -lR /usr.txt
total 0
drwxr-xr-x 3 root wheel 102 10 20 13:24 adic
drwxr-xr-x 1058 root wheel 35972 11 25 18:49 bin
drwxr-xr-x 280 root wheel 9520 11 25 18:49 lib
drwxr-xr-x 204 root wheel 6936 11 25 18:49 libexec
drwxr-xr-x 2 root wheel 68 7 31 05:49 local
drwxr-xr-x 246 root wheel 8364 11 25 18:49 sbin
drwxr-xr-x 46 root wheel 1564 11 25 18:49 share
drwxr-xr-x 5 root wheel 170 10 21 17:55 standalone
@umireon
umireon / tempfile_create.rb
Created November 20, 2016 08:28
Tempfile::create polyfill for Ruby < 2.1
require 'tempfile'
unless Tempfile.respond_to? :create
# from https://github.com/ruby/ruby/blob/v2_3_2/lib/tempfile.rb#L326-L343
def Tempfile.create(basename, tmpdir=nil, mode: 0, **options)
tmpfile = nil
Dir::Tmpname.create(basename, tmpdir, options) do |tmpname, n, opts|
mode |= File::RDWR|File::CREAT|File::EXCL
opts[:perm] = 0600
tmpfile = File.open(tmpname, mode, opts)
@umireon
umireon / osxfuse.rb
Last active November 18, 2016 07:03
DISCLAIMER: not tested
cask 'osxfuse' do
version '3.5.3'
sha256 '9d48cbfe360bead9e9fd31bc95e18a90f03be7c4be5b5c62acd7df98c8c0c80b'
# github.com/osxfuse was verified as official when first introduced to the cask
url "https://github.com/osxfuse/osxfuse/releases/download/osxfuse-#{version}/osxfuse-#{version}.dmg"
appcast 'https://github.com/osxfuse/osxfuse/releases.atom',
checkpoint: '7d27fe5e4795751d1e734f3f8e38d62c5fd299f91b5c5a6885de9720dcba3f99'
name 'OSXFUSE'
homepage 'https://osxfuse.github.io/'
let attrs: [NSLayoutAttribute: String] = [.left: "left", .right: "right", .top: "top", .bottom: "bottom", .leading: "leading", .trailing: "trailing", .width: "width", .height: "height", .centerX: "centerX", .centerY: "centerX", .lastBaseline: "lastBaseline", .firstBaseline: "firstBaseline", .notAnAttribute: "notAnAttribute"]
let rels: [NSLayoutRelation: String] = [.lessThanOrEqual: "lessThanOrEqual", .equal: "equal", .greaterThanOrEqual: "greaterThanOrEqual"]
for (i, v) in view.constraints.enumerated() {
Swift.print("===", i, "===")
Swift.print("item:", v.firstItem.map{ Mirror(reflecting: $0).subjectType } as Any)
Swift.print("attribute:", attrs[v.firstAttribute]!)
Swift.print("relatedBy:", rels[v.relation]!)
Swift.print("toItem:", v.secondItem.map{ Mirror(reflecting: $0).subjectType } as Any)
Swift.print("attribute:", attrs[v.secondAttribute]!)
@umireon
umireon / basic+langjapanese.txt
Last active April 14, 2016 17:44
TeX Live packages
i adobemapping: Adobe cmap and pdfmapping files
i ae: Virtual fonts for T1 encoded CMR-fonts.
i amscls: AMS document classes for LaTeX.
i amsfonts: TeX fonts from the American Mathematical Society.
i amsmath: AMS mathematical facilities for LaTeX
i anysize: A simple package to set up document margins.
i arabxetex: An ArabTeX-like interface for XeLaTeX
i automata: Finite state machines, graphs and trees in MetaPost.
i babel: Multilingual support for Plain TeX or LaTeX
i babel-basque: Babel contributed support for Basque.
@umireon
umireon / perms.hs
Created February 8, 2015 07:32
interleaver and permutation
perms :: [Int] -> [[Int]]
perms [] = [[]]
perms (t:ts) = concatMap (interleave id t) (perms ts)
interleave :: ([Int] -> [Int]) -> Int -> [Int] -> [[Int]]
interleave f t [] = [f [t]]
interleave f t (x:xs) = (f (t:x:xs)) : interleave (f . (x:)) t xs
---
driver:
name: vagrant
provisioner:
name: chef_zero
platforms:
- name: centos-6.6
@umireon
umireon / Vagrantfile
Last active August 29, 2015 14:12
Install Atlassian Stash into Vagrant with Chef
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "chef/centos-6.5"
config.vm.provision 'chef_zero' do |chef|
chef.cookbooks_path = 'berks-cookbooks'
chef.add_recipe 'java'
chef.add_recipe 'stash'
chef.json = {
java: {
jdk_version: 7