Skip to content

Instantly share code, notes, and snippets.

View kentaro's full-sized avatar

Kentaro Kuribayashi kentaro

View GitHub Profile
$ cpanm Module::Install::Repository
Module::Install::Repository is up to date. (0.06)
$ cpanm Encode::Base58::BigInt
--> Working on Encode::Base58::BigInt
Fetching http://www.cpan.org/authors/id/S/SA/SATOH/Encode-Base58-BigInt-0.02.tar.gz ... OK
Configuring Encode-Base58-BigInt-0.02 ... N/A
! Configure failed for Encode-Base58-BigInt-0.02. See /Users/kentaro/.cpanm/build.log for details.
$ lv ~/.cpanm/build.log
(defun ag ()
(interactive)
(let ((grep-command "ag -a --nocolor ")
(grep-find-command "ag --nocolor --nogroup "))
(call-interactively 'grep-find)))
@kentaro
kentaro / gist:4975262
Created February 18, 2013 05:22
flatten
#!/usr/bin/env perl
use strict;
use warnings;
use YAML;
sub flatten {
my @list = @_;
map {
my $element = $_;
@kentaro
kentaro / My First FizzBuzz in Haskell
Created January 6, 2013 09:13
FizzBuzz in Haskell
fizzBuzz n = take n [
if (m `mod` 15) == 0 then "FizzBuzz"
else if (m `mod` 3) == 0 then "Fizz"
else if (m `mod` 5) == 0 then "Buzz"
else show m
| m <- [1..] ]
$ ruby -rbundler -e 'Bundler.require; p Gem::Specification.dirs'
/Users/usr0600239/.rbenv/versions/2.0.0-dev/lib/ruby/gems/2.0.0/gems/bundler-1.2.1/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)
~/dev/github/triglav (2.0.0-dev) (git)-[master]
$ ls /Users/usr0600239/.rbenv/versions/2.0.0-dev/lib/ruby/gems/2.0.0/specifications
bigdecimal-1.1.0.gemspec method_source-0.8.1.gemspec rspec-2.11.0.gemspec
bundler-1.2.1.gemspec minitest-3.4.0.gemspec rspec-core-2.11.1.gemspec
coderay-1.0.8.gemspec pry-0.9.10.gemspec rspec-expectations-2.11.3.gemspec
diff-lcs-1.1.3.gemspec psych-1.3.4.gemspec rspec-mocks-2.11.3.gemspec
io-console-0.3.gemspec rake-0.9.2.2.gemspec slop-3.3.3.gemspec
json-1.7.1.gemspec rdoc-3.9.4.gemspec test-unit-2.0.0.0.gemspec
$
~/dev/github/triglav (2.0.0-dev) (git)-[master]
<?php
class Foo {
public function __call($name, $arguments) {
echo $name . "\n";
}
public function foo() {
echo "fooooo\n";
}
<?xml version='1.0'?>
<!DOCTYPE signatures SYSTEM "file://localhost/System/Library/DTDs/BridgeSupport.dtd">
<signatures version='1.0'>
<struct type='{CGAffineTransform=&quot;a&quot;f&quot;b&quot;f&quot;c&quot;f&quot;d&quot;f&quot;tx&quot;f&quot;ty&quot;f}' name='CGAffineTransform'/>
<struct type='{CGDataConsumerCallbacks=&quot;putBytes&quot;^?&quot;releaseConsumer&quot;^?}' name='CGDataConsumerCallbacks'/>
<struct type='{CGDataProviderCallbacks=&quot;getBytes&quot;^?&quot;skipBytes&quot;^?&quot;rewind&quot;^?&quot;releaseProvider&quot;^?}' name='CGDataProviderCallbacks'/>
<struct type='{CGDataProviderDirectAccessCallbacks=&quot;getBytePointer&quot;^?&quot;releaseBytePointer&quot;^?&quot;getBytes&quot;^?&quot;releaseProvider&quot;^?}' name='CGDataProviderDirectAccessCallbacks'/>
<struct type='{CGDataProviderDirectCallbacks=&quot;version&quot;I&quot;getBytePointer&quot;^?&quot;releaseBytePointer&quot;^?&quot;getBytesAtPosition&quot;^?&quot;releaseInfo&quot;^?}' name='CGDataProviderDirectCallbacks'/>
<struct typ
/*
Do not change this file.
Generated from BridgeSupport.
/usr/bin/gen_bridge_metadata --no-64-bit -f "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/QuartzCore.framework" -c "-I/Users/usr0600239/tmp/mobiruby-ios/modules/mruby/include -I/Users/usr0600239/tmp/mobiruby-ios/modules/libffi/include -I/Users/usr0600239/tmp/mobiruby-ios/modules/mobiruby-common/include -I/Users/usr0600239/tmp/mobiruby-ios/modules/mruby-cocoa/include -I/Users/usr0600239/tmp/mobiruby-ios/modules/mruby-cfunc/include -DALLOC_PADDING=8 -DUSE_MRBC_DATA -arch i386 -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk"
/usr/bin/gen_bridge_metadata --no-64-bit -f "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/AVFoundation.framework" -c "-I/Us
/*
Do not change this file.
Generated from BridgeSupport.
*/
#include "cocoa.h"
#import "UIKit/UIAccelerometer.h"
#import "UIKit/UIAccessibility.h"
#import "UIKit/UIAccessibilityAdditions.h"
#import "UIKit/UIAccessibilityConstants.h"
#import "UIKit/UIAccessibilityElement.h"