Skip to content

Instantly share code, notes, and snippets.

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

OMOTO Tsukasa henry0312

💭
I may be slow to respond.
View GitHub Profile
#!/usr/bin/env ruby
require 'uri'
if ARGV.size != 1
warn "Invalid argument"
exit
end
methods = []
ERROR: freetype2 not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #libav on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
HOMEBREW_VERSION: 0.9.4
HEAD: 72cdbc66d8c07862fe904a5d9341079aaf89f105
--- lisp/term/ns-win.el.patched 2013-07-04 15:11:31.000000000 +0900
+++ lisp/term/ns-win.el 2013-07-04 15:11:47.000000000 +0900
@@ -1285,6 +1285,58 @@
(title . "半英")
(cursor-color)
(cursor-type))
+ ("com.justsystems.inputmethod.atok26.Japanese"
+ (title . "ひらがな")
+ (cursor-color)
+ (cursor-type))
@henry0312
henry0312 / descriptive_statistics.rb
Created November 20, 2012 13:32
Descriptive statistics in Ruby
# Add methods to Enumerable, which makes them available to Array
module Enumerable
# sum of an array of numbers
def sum
return self.inject(0,:+)
end
# average of an array of numbers
def mean
@henry0312
henry0312 / gist:4012616
Created November 4, 2012 17:07
pigoz/mplayer2/mplayer2
$ brew install --HEAD pigoz/mplayer2/mplayer2 --with-libav
==> Cloning git://git.mplayer2.org/mplayer2.git
Updating /Library/Caches/Homebrew/mplayer2--git
==> Checking out branch unstable
==> Generating VERSION from the Homebrew's git cache
==> ./configure --prefix=/usr/local/Cellar/mplayer2/HEAD --cc=cc --enable-macosx-bundle --enable-macosx-finder --enable-
==> make install
rst2man not found. You need the Docutils system to generate the manpages (preferably version >= 0.9; 0.8 and older are known to corrupt the arguments shown in some option descriptions). Alternatively you can use 'install-no-man' rule.
@henry0312
henry0312 / BetaDistribution.hpp
Last active October 12, 2015 09:28
Beta Distribution
/*
* BetaDistribution.hpp
*
* Copyright (c) 2012 Tsukasa OMOTO <[email protected]>
*
* 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 furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
@henry0312
henry0312 / build_gcc4.7.2.sh
Created October 19, 2012 17:28
Build GCC 4.7.2 on OS X Mountain Lion
#!/bin/sh
# GCC
## Prerequisites for GCC
## http://gcc.gnu.org/install/prerequisites.html
## Installing GCC: Configuration
## http://gcc.gnu.org/install/configure.html
# 初期設定
GCC_VER=4.7.2
@henry0312
henry0312 / taglib1.7.2.diff
Created October 18, 2012 14:41
Revert 276e2eb46735726eff17ecda1ead08c6001db9af
diff --git a/contrib/src/taglib/7036.patch b/contrib/src/taglib/7036.patch
new file mode 100644
index 0000000..4c8f98c
--- /dev/null
+++ b/contrib/src/taglib/7036.patch
@@ -0,0 +1,27 @@
+From 7cc36db7606dfc85d2e344d35c4e26fe8f698bdc Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <[email protected]>
+Date: Sat, 6 Aug 2011 11:05:11 +0200
+Subject: [PATCH] Use the default frame factory when it's necessary to parse
@henry0312
henry0312 / rules.mak.diff
Created October 18, 2012 11:57
Fix compiling libdvdnav
diff --git a/contrib/src/dvdnav/rules.mak b/contrib/src/dvdnav/rules.mak
--- a/contrib/src/dvdnav/rules.mak
+++ b/contrib/src/dvdnav/rules.mak
@@ -24,7 +24,7 @@ $(TARBALLS)/libdvdnav-git.tar.xz:
dvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.xz .sum-dvdnav
$(UNPACK)
- $(APPLY) $(SRC)/dvdnav/dvdnav.patch
+ #$(APPLY) $(SRC)/dvdnav/dvdnav.patch
$(MOVE)
@henry0312
henry0312 / lib-asprintf.h.diff
Created October 18, 2012 11:56
Fix compiling libasprintf
--- lib-asprintf.h.orig 2012-10-18 17:28:50.854969895 +0900
+++ lib-asprintf.h 2012-10-18 17:24:19.707008903 +0900
@@ -29,6 +29,7 @@
#else
/* Get asprintf(), vasprintf() declarations. */
-#include "vasprintf.h"
+//#include "vasprintf.h"
+#include <stdio.h>