Skip to content

Instantly share code, notes, and snippets.

View makotoshimazu's full-sized avatar

Makoto Shimazu makotoshimazu

View GitHub Profile
" Enable modern Vim features not compatible with Vi spec.
set nocompatible
" Use the 'google' package by default (see http://go/vim/packages).
let google_vim = "/usr/share/vim/google/google.vim"
if filereadable(google_vim)
execute 'source' fnameescape(google_vim)
endif
" release autogroup in MyAutoCmd
;; 冷房, 16度(最低), 風速 自動, 風向 自動, ON->OFF
++------------------------------------- 電源ON/OFF
|| ++------------------------------- 温度のオフセット
|| || ++- チェックサム
23 CB 26 01 00 20 18 00 36 80 00 00 00 00 00 00 00 03
23 CB 26 01 00 00 18 00 36 40 00 00 00 00 00 00 00 A3
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
void setup()
{
Serial.begin(115200);
Serial.println("----");
pinMode(13, INPUT);
}
enum State {
OFF = 0,
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <Stewitter.h>
/* Settings */
const int irLedPin = 4;
const char* ssid = "ssid";
const char* password = "password";
Stewitter<WiFiClient> twitter("your_token");
@makotoshimazu
makotoshimazu / mm.c
Created December 14, 2015 02:24
mm.c
//! gcc -o mm.bin mm.c -W -Wall -O3 -std=gnu99
/*
* mm.c
*
* Author: Makoto Shimazu <[email protected]>
* URL: https://amiq11.tumblr.com
* License: 2-Clause BSD License
* Created: 2015-12-14
*
*
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <termios.h>
@makotoshimazu
makotoshimazu / skype_simple.c
Last active August 29, 2015 14:23
send/recv
//! gcc -o skype_simple_serv.bin skype_simple_serv.c -W -Wall -O3 -std=gnu99
/*
* skype_simple_serv.c
*
* Author: Makoto Shimazu <[email protected]>
* URL: https://amiq11.tumblr.com
* License: MIT License
* Created: 2015-06-22
*
*/
@makotoshimazu
makotoshimazu / gogs_persistent.patch
Created March 22, 2015 04:20
gogsを簡単に永続化させるためのパッチ
diff --git a/.gitignore b/.gitignore
index ba878d9..265d8fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,5 +34,6 @@ config.codekit
docker/fig.yml
docker/docker/Dockerfile
docker/docker/init_gogs.sh
+docker/docker/misc/
gogs.sublime-project
@makotoshimazu
makotoshimazu / copy_multi_area.cpp
Created February 17, 2015 14:21
Measure throughput of memory
//! g++ -o copy_multi_area copy_multi_area.cpp -W -Wall -std=c++11 -O3 -mavx -funroll-loops
/*
* copy_multi_area.cpp
*
* Author: Makoto Shimazu <[email protected]>
* URL: https://amiq11.tumblr.com
* License: MIT License
* Created: 2015-02-17
*
*/
@makotoshimazu
makotoshimazu / git-feature
Last active August 29, 2015 14:12
Redmineでチケット番号を入れるのが面倒なのでつくった
#!/bin/bash
#
# git-feature
#
# Author: Makoto Shimazu <[email protected]>
# URL: https://amiq11.tumblr.com
# License: MIT License
# Created: 2015-01-06
#