Skip to content

Instantly share code, notes, and snippets.

View kfly8's full-sized avatar
๐Ÿช
Working from home

kobaken kfly8

๐Ÿช
Working from home
View GitHub Profile
@kfly8
kfly8 / todo.md
Last active August 29, 2015 14:05
YAPCใ‚นใ‚ฟใƒƒใƒ•ใจใ—ใฆใ€YAPCใฎๅ„ใƒˆใƒผใ‚ฏ ใซใ‚นใƒฉใ‚คใƒ‰ใ‚’ๅŸ‹ใ‚ใ‚‹็‚บใฎTODOใƒชใ‚นใƒˆ ใ€€

YAPC::Asia 2014 talks and slide

http://yapcasia.org/2014/talk/list
ใ‚ใจใงๅผ•ใฃ่ถŠใ—ไบˆๅฎšใชใฎใงใ€ใ‚นใ‚ฟใƒƒใƒ•ไปฅๅค–ใฏใƒ–ใ‚ฏใƒžใ™ใ‚‹ในใ‹ใ‚‰ใš

TODO!!

  • One layer down below. (20 ๅˆ†)
  • Kang-min Liu [ใƒฌใ‚ฎใƒฅใƒฉใƒผ] [ใใฎไป–] [่‹ฑ่ชž]
CREATE TABLE user_event_ranking (
event_id INTEGER,
user_id INTEGER,
score INTEGER,
PRIMARY KEY (event_id, user_id),
INDEX KEY (event_id, score)
);
CREATE TABLE user_event_ranking (
@kfly8
kfly8 / bulk_check.html
Created August 21, 2014 11:16
angular sample
<!doctype html>
<html ng-app='sample'>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js"></script>
<script>
angular.module('sample', [])
.controller('MainCtrl', ['$scope', function($scope) {
$scope.bulk_check = function() {
angular.forEach($scope.items, function(item) {

ไบ”ๅ็”ฐใ‚‚ใใ‚‚ใไผš #1

็›ฎๆฌก

  • ใ‚ฟใ‚คใƒ ใ‚นใ‚ฑใ‚ธใƒฅใƒผใƒซ
  • ่ซธๆณจๆ„
  • ้‹ๅ–ถๅ‘ใ‘TODO
@kfly8
kfly8 / infite_loop.pl
Last active August 29, 2015 14:04
weighted_shuffle_list
use List::UtilsBy qw/weighted_shuffle_by/;
my @wlist = (
{ value => 'a', weight => 0 },
{ value => 'b', weight => 0 },
);
weighted_shuffle_by { $_->{weight} } @wlist;
@kfly8
kfly8 / gist:ca126161ecf35d697f06
Created July 24, 2014 15:23
0 ใซ่ฉ•ไพกใ•ใ‚Œใ‚‹ใฎใŒ่ค‡ๆ•ฐใ‚ใ‚‹ใจใ€็„ก้™ใƒซใƒผใƒ—ใฎใ‚ˆใ†
use List::UtilsBy qw/weighted_shuffle_by/;
my @wlist = (
{ value => 'a', weight => 0 },
{ value => 'b', weight => 0 },
);
weighted_shuffle_by { $_->{weight} } @wlist;
@kfly8
kfly8 / REAME.md
Last active August 29, 2015 14:03
yapc asia 2014 ใฎๅฟœๅ‹Ÿใƒˆใƒผใ‚ฏใฎๆ–ญ็‰‡
@kfly8
kfly8 / heroku-ruby-hello-world.md
Last active August 29, 2015 13:59
ใ‚‚ใฐใ“ใ‚“ใฎไธ‹ๆบ–ๅ‚™ใ™ใ‚‹ใ‚ˆใƒผ #ใ‚‚ใฐใ“ใ‚“
#!/usr/bin/env perl
use 5.10.0;
use strict;
use warnings;
use Test::More;
sub hoge { join ',', ('?') x @_ }
is hoge(qw/1 3 4 5/), '?,?,?,?';
#!/usr/bin/env perl
use 5.10.0;
use strict;
use warnings;
use Test::More;
sub hoge {
my %ret;
for my $row (@_) {