Skip to content

Instantly share code, notes, and snippets.

View moznion's full-sized avatar

moznion moznion

View GitHub Profile
@moznion
moznion / cpanize_minil.md
Last active August 29, 2015 14:07
Minilla使ってCPANにブツを上げる

ホームディレクトリに.pauseというファイルを作る

$ vi ~/.pause

以下のように書く

user USER_NAME
2014/09/18 11:49:12 [FAIL] //h2/text() match Hello\s+isucon79\!
2014/09/18 11:49:12 %v <!DOCTYPE html>
<html lang="en" class="">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Language" content="en">
#define CUDA_SAFE_CALL(func) \
do { \
cudaError_t err = (func); \
if (err != cudaSuccess) { \
fprintf(stderr, "[Error] %s (error code: %d) at %s line %d\n", cudaGetErrorString(err), err, __FILE__, __LINE__); \
exit(err); \
} \
} while(0)
#include <stdio.h>
int main(int argc, char** argv) {
cudaError_t err;
char *device_name = "Quadro K6000";
int device_count;
err = cudaGetDeviceCount(&device_count);
if (err) {
#include <stdio.h>
#define DATA_NUM 1024
#define DATA_SIZE sizeof(double) * DATA_NUM
#define BLOCK_SIZE 128
#define TRIALS 100
void cudaSetDeviceSafe(int);
void cudaMallocSafe(void*, int);
void cudaMallocHostSafe(void*, int);
#include <stdio.h>
#define DATA_NUM 10
#define DATA_SIZE sizeof(double) * DATA_NUM
#define TRIALS 50
void cudaSetDeviceSafe(int);
void cudaMallocSafe(void*, int);
void cudaMallocHostSafe(void*, int);
void cudaMemcpySafe(void*, const void*, size_t, cudaMemcpyKind);
use Compiler::Lexer;
while(1) {
Compiler::Lexer->new->tokenize('/');
}
package Your::App::DB::Schema;
use strict;
use warnings;
use Teng::Schema::Declare;
table {
name "table_name";
pk "id";
columns qw( id col1 col2 col3 );
};
chrome.storage.local.set({
"foo": Infinity
}, function () {
chrome.storage.local.get('foo', function (result) {
console.log(result['foo']); // <= undefined (Infinityにならない)
});
});
chrome.storage.local.set({
"foo": 42
#!/usr/bin/env perl
use strict;
use warnings;
use feature qw/say/;
use Coro;
use Coro::AnyEvent;
my $var;