Skip to content

Instantly share code, notes, and snippets.

View makotoshimazu's full-sized avatar

Makoto Shimazu makotoshimazu

View GitHub Profile
@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
*
*/
#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 / 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 <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");
void setup()
{
Serial.begin(115200);
Serial.println("----");
pinMode(13, INPUT);
}
enum State {
OFF = 0,
;; 冷房, 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
" 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
#IfWinActive, ahk_class ConsoleWindowClass
^a::SendInput {HOME}
^e::SendInput {END}
^u::SendInput {ESC}
^p::SendInput {Up}
^n::SendInput {Down}
^l::SendInput {ESC}cls{ENTER}
^f::SendInput {right}
^b::SendInput {left}
^h::SendInput {BS}
namespace {
extern "C" {
#include <linux/sched.h>
#include <linux/kernel.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <linux/types.h>
#include <sched.h>
@makotoshimazu
makotoshimazu / .clang-complete
Last active July 14, 2018 23:59
For completion of Arduino sketches
-std=gnu++11
-I/PATH/TO/ARDUINO/arduino-1.8.5/hardware/arduino/avr/cores/arduino/
-I/PATH/TO/ARDUINO/arduino-1.8.5/hardware/tools/avr/avr/include
-I/PATH/TO/ARDUINO/arduino-1.8.5/hardware/arduino/avr/libraries/
-I/PATH/TO/ARDUINO/arduino-1.8.5/hardware/arduino/avr/libraries/EEPROM/src
-I/PATH/TO/ARDUINO/arduino-1.8.5/hardware/arduino/avr/libraries/HID/src
-I/PATH/TO/ARDUINO/arduino-1.8.5/hardware/arduino/avr/libraries/SPI/src
-I/PATH/TO/ARDUINO/arduino-1.8.5/hardware/arduino/avr/libraries/SoftwareSerial/src
-I/PATH/TO/ARDUINO/hardware/arduino/avr/libraries/Wire/src
-include /PATH/TO/ARDUINO/hardware/arduino/avr/cores/arduino/Arduino.h