Skip to content

Instantly share code, notes, and snippets.

@totegamma
totegamma / main.c
Created August 27, 2018 07:10
use MCP4922 with pic18f4553
/*
* File: main.c
* Author: thotgamma
*
* Created on August 4, 2018, 4:31 AM
*/
#pragma config FOSC = HS // 20MHz Xtal(分周なし)
#pragma config MCLRE = ON // リセットピンを利用する
#pragma config LVP = OFF // 低電圧プログラミング機能使用しない(OFF)
@totegamma
totegamma / sample.cpp
Created February 20, 2018 04:35
simple tile texture
uint8_t mytex[3*256*256];
for (int i = 0; i < 256; i++) {
for (int j = 0; j < 256; j++) {
bool flagA = (i % 32) < 16;
bool flagB = (j % 32) < 16;
if (flagA ^ flagB) {
mytex[3*(i+256*j)+0] = 32;
mytex[3*(i+256*j)+1] = 33;
#include <GLUT/glut.h>
#include <stdio.h>
#include <random>
#include <math.h>
#include <iostream>
#include <time.h>
#include "header.h"
using namespace std;
@totegamma
totegamma / .vimrc
Last active October 21, 2016 12:02
"-=-=-=-=-=-=-=-=-=-=-=-=-=-"
" .vimrc "
" created by thotgamma "
" http://lab.thotgamma.com "
"-=-=-=-=-=-=-=-=-=-=-=-=-=-"
" このvimrcのバージョン
let s:version = "1.1"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@totegamma
totegamma / pluginList.toml
Last active October 21, 2016 05:25
pluginList.toml
[[plugins]]
repo = 'shougo/dein.vim'
[[plugins]]
repo = 'itchyny/lightline.vim'
[[plugins]]
repo = 'scrooloose/syntastic'
[[plugins]]
if has('vim_starting')
" 初回起動時のみruntimepathにneobundleのパスを指定する
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
" NeoBundleを初期化
call neobundle#begin(expand('~/.vim/bundle/'))
" インストールするプラグインをここに記述