Skip to content

Instantly share code, notes, and snippets.

if has('vim_starting')
" 初回起動時のみruntimepathにneobundleのパスを指定する
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
" NeoBundleを初期化
call neobundle#begin(expand('~/.vim/bundle/'))
" インストールするプラグインをここに記述
@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]]
@totegamma
totegamma / .vimrc
Last active October 21, 2016 12:02
"-=-=-=-=-=-=-=-=-=-=-=-=-=-"
" .vimrc "
" created by thotgamma "
" http://lab.thotgamma.com "
"-=-=-=-=-=-=-=-=-=-=-=-=-=-"
" このvimrcのバージョン
let s:version = "1.1"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#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 / 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;
@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)
"-=-=-=-=-=-=-=-=-=-=--"
" .vimrc "
" created by thotgamma "
" https://gammalab.net "
"-=-=-=-=-=-=-=-=-=-=-="
" プラグイン管理ツールとしてdein.vimを使う。
" ### 定数等の設定
mat_coo_t* create_coo_from_mmfile(const char* filename) {
MTR_BEGIN_FUNC();
const int BufferSize = 1024;
FILE* fp = fopen(filename, "r");
char line[BufferSize];
int state = 0; //0: size, else: content
mat_coo_t* coo;
int itr = 0;
<?php
$todofuken=array(
'北海道'=>'hokkaido',
'青森県'=>'aomori',
'岩手県'=>'iwate',
'宮城県'=>'miyagi',
'秋田県'=>'akita',
'山形県'=>'yamagata',
'福島県'=>'fukushima',
@totegamma
totegamma / hls_stream.h
Created August 17, 2020 12:38
vivadoHLSのstreamを検証用に簡易的に実装したものです
#include <stdio.h>
#include <queue>
namespace hls {
template <typename T>
class stream {
const char* name;
std::queue<T> queue;