Skip to content

Instantly share code, notes, and snippets.

Avatar
👶

taiyoh taiyoh

👶
View GitHub Profile
@taiyoh
taiyoh / keymap.c
Created Jan 2, 2019
keymap for fortitude60
View keymap.c
#include QMK_KEYBOARD_H
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _DVORAK 0
View keymap.c
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
#define DVRK 0
#define QWTY 1
#define META 2
#define SYMB 3
// Fillers to make layering more clear
View graphql-example.pl
#!perl
use 5.014;
use warnings;
use GraphQL::Schema;
use GraphQL::Execution qw/execute/;
use Data::Dumper;
@taiyoh
taiyoh / Dockerfile
Created Sep 14, 2017
Dockerfile for cmark-gfm
View Dockerfile
FROM alpine
RUN apk --update add --virtual build-dependencies curl cmake make gcc g++ && rm -rf /var/cache/apk/*
ENV cmark_version=0.27.1.gfm.1
RUN curl -L https://github.com/github/cmark/archive/${cmark_version}.tar.gz -o cmark_${cmark_version}.tar.gz && \
tar xvzf cmark_${cmark_version}.tar.gz && cd cmark-${cmark_version} && mkdir build && cd build && \
cmake .. && make && make test && make install
ENTRYPOINT cmark-gfm
View bme280_main.go
package main
import (
// "fmt"
"github.com/kidoman/embd"
_ "github.com/kidoman/embd/host/rpi"
"github.com/taiyoh/go-embd-bme280"
"time"
)
View main.go
package main
import (
mkr "github.com/mackerelio/mackerel-client-go"
"github.com/taiyoh/go-cm160"
"log"
"os"
"os/signal"
"syscall"
"time"
View record_radiko.pl
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use FindBin::libs;
use Radiko;
my $radiko = Radiko->new(
channel => 'INT', # see http://www.dcc-jpl.com/foltia/wiki/radikomemo
View main.go
package main
import (
"fmt"
"github.com/taiyoh/go-cm160"
)
func main() {
volt := 100
device := cm160.Open()
View test.go
package main
/*
#include <stdio.h>
void test(unsigned char* b) {
printf("fetch: %s\n", b);
b[0] = 'b';
b[1] = 'a';
b[2] = 'r';
}
View gnome-gyazo.sh
#!/bin/sh
GYAZO_HOST="example.com"
GYAZO_PORT=8080
GYAZO_PATH="/foo/bar"
NOW=`date +"%s"`
TMPFILE="/tmp/$NOW.jpg"
gnome-screenshot --area --file $TMPFILE 2> /dev/null