This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>OnsenUI Tutorial</title> | |
<!-- Required libs --> | |
<script src=""></script> | |
<script src="https://unpkg.com/onsenui/js/onsenui.js"></script> |
This file contains 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 | |
auto_ssh() { | |
host=$1 | |
id=$2 | |
pass=$3 | |
expect -c " | |
set timeout 10 | |
spawn ssh ${id}@${host} |
This file contains 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
# -*- coding: utf-8 -*- | |
import argparse | |
import numpy as np | |
import os | |
from PIL import Image | |
import chainer | |
from chainer import cuda | |
from chainer import functions as F |
This file contains 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
#include <EGL/egl.h> | |
#include <EGL/eglext.h> | |
#include <GLES2/gl2.h> | |
#include <assert.h> | |
#include <fcntl.h> | |
#include <gbm.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> |
This file contains 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
//--------------------------------------------------------- | |
// Cat's eye | |
// | |
// ©2017 Yuichiro Nakada | |
//--------------------------------------------------------- | |
#include <EGL/egl.h> | |
#include <EGL/eglext.h> | |
#include <GLES2/gl2.h> | |
#include <assert.h> |
This file contains 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
long fsize(char *name) | |
{ | |
struct stat stbuf; | |
int fd = open(name, O_RDONLY); | |
if (fd == -1) return -1; | |
if (fstat(fd, &stbuf) == -1) return -1; | |
close(fd); | |
return stbuf.st_size; | |
} |
This file contains 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
#ifndef __JSMN_H_ | |
#define __JSMN_H_ | |
#include <stddef.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
/** |
This file contains 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
// The latest version of this library is available on GitHub; | |
// https://github.com/sheredom/json.h | |
// This is free and unencumbered software released into the public domain. | |
// | |
// Anyone is free to copy, modify, publish, use, compile, sell, or | |
// distribute this software, either in source code form or as a compiled | |
// binary, for any purpose, commercial or non-commercial, and by any | |
// means. | |
// |
This file contains 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
# ©2017 YUICHIRO NAKADA | |
PROGRAM = hello | |
CC = clang | |
CPP = clang++ | |
CFLAGS = -Wall -Os | |
CPPFLAGS= $(CFLAGS) | |
LDFLAGS = | |
CSRC = $(wildcard *.c) |
This file contains 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 *recalloc(void *p, int s, int ss) | |
{ | |
void *r = calloc(ss, 1); | |
if (!r) return 0; | |
memcpy(r, p, s); | |
free(p); | |
return r; | |
} |
OlderNewer