This file contains hidden or 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
/* | |
* Receive the signal of infrared remote controller. | |
*/ | |
#define RX_PIN 7 | |
#define LOW_STATE 0 | |
#define HIGH_STATE 1 | |
typedef unsigned long ulong; | |
typedef unsigned int uint; |
This file contains hidden or 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
- (void)constructCustomButton:(UIBarButtonItem *)button | |
imageFileName:(NSString *)imageFileName | |
imageRect:(CGRect) | |
delegate:(SEL)delegate { | |
UIButton *customUseCouponButton = [[UIButton alloc] initWithFrame:imageRect]; | |
[customUseCouponButton setBackgroundImage:[UIImage imageNamed:imageFileName] | |
forState:UIControlStateNormal]; | |
[customUseCouponButton addTarget:self action:delegate forControlEvents:UIControlEventTouchUpInside]; | |
[button setCustomView:customUseCouponButton]; |
This file contains hidden or 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/env ruby | |
# coding: utf-8 | |
executing_processes = []; | |
10.times do |i| | |
if (executing_processes.length >= 3) | |
pid = Process.wait | |
executing_processes.reject! { |process| process == pid } | |
end |
This file contains hidden or 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
String.prototype.restOmit = function(numberOfChar) { | |
if (this.length > numberOfChar) { | |
return this.slice(0, numberOfChar) + '...'; | |
} | |
return this; | |
} |
This file contains hidden or 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
#!/bin/bash | |
array=('one' 'two' 'three' 'four') | |
opt_name='--exclude' | |
opts='' | |
for elem in ${array[@]}; do | |
opts=$opts$opt_name' '$elem' ' | |
done |
This file contains hidden or 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
Creating /var/folders/cs/xyvyz40133z0g84f43jsrdnm0000gn/T/perl-build-20130327-19415399555(building directory) | |
Install 5.12.5 to /Users/ta_kawakami/.plenv/versions/5.12.5 | |
Fetching 5.12.5 as /var/folders/cs/xyvyz40133z0g84f43jsrdnm0000gn/T/QA1hQLU1uI/perl-5.12.5.tar.bz2 | |
Downloaded http://search.cpan.org/CPAN/authors/id/D/DO/DOM/perl-5.12.5.tar.bz2 to /var/folders/cs/xyvyz40133z0g84f43jsrdnm0000gn/T/QA1hQLU1uI/perl-5.12.5.tar.bz2. | |
rm -f config.sh Policy.sh | |
/usr/bin/perl -Mlib=/Users/ta_kawakami/.plenv/bin/../share/plenv//lib/perl5/ /Users/ta_kawakami/.plenv/bin/../share/plenv/bin/patchperl | |
Auto-guessed '5.12.5' | |
patching cpan/Archive-Tar/t/02_methods.t | |
patching ext/ODBM_File/hints/linux.pl | |
patching make_ext.pl |
This file contains hidden or 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
requires 'App::cpanminus' => '1.6008'; | |
requires 'JSON' => '2.53'; | |
requires 'Furl' => '2.10'; | |
_requires 'List::Util' => 0; | |
on 'configure' => sub { | |
requires 'Module::Build' => '0.40'; | |
requires 'Module::Build' => '0.09'; | |
}; |
This file contains hidden or 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
#!/bin/sh | |
decide_parent_branch() { | |
parent_branch=$1 | |
if [ -z $parent_branch ] ; then | |
parent_branch='master' | |
fi | |
echo $parent_branch | |
} |
This file contains hidden or 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/env perl | |
use strict; | |
use warnings; | |
print "foo\n"; | |
print "bar\n"; | |
# foo | |
# bar |
This file contains hidden or 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/env perl | |
use strict; | |
use warnings; | |
use 5.008009; | |
use Furl; | |
use JSON; | |
my $module = shift @ARGV; |