View index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<title>COLOR CODE</title> | |
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script> | |
<style> | |
body { | |
display: flex; | |
justify-content: space-evenly; |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX = $(MIX_APP_PATH)/priv | |
BUILD = $(MIX_APP_PATH)/obj | |
NIF = $(PREFIX)/counter_nif.so | |
CFLAGS = -std=c++11 -fpic | |
LDFLAGS = -lpthread -dynamiclib -undefined dynamic_lookup | |
ERL_CFLAGS = -I$(ERL_EI_INCLUDE_DIR) | |
ERL_LDFLAGS = -L$(ERL_EI_LIBDIR) -lei |
View ec2_stat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'aws-sdk-ec2' | |
require 'thor' | |
class Ec2Stat < Thor | |
default_command :stat | |
desc :stat, 'show statuses of ec2 instances' | |
option :profile, aliases: '-p', default: 'default' |
View events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$1" = "production" ]; then | |
STAGE=production | |
elif [ "$1" = "staging" ] || [ "$1" = "" ]; then | |
STAGE=staging | |
else | |
cat <<EOS | |
usage: |
View harndler.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'net/https' | |
def hello(event:, context:) | |
uri = URI.parse(ENV['IDOBATA_HOOK_URL']) | |
source = event['source'] | |
Net::HTTP.post_form(uri, {source: source}) | |
end |
View ads7846.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ADS7846 do | |
use Scenic.ViewPort.Driver | |
alias Scenic.ViewPort | |
require Logger | |
defguard is_pos(x, y) when is_number(x) and is_number(y) | |
@init_retry_ms 400 | |
@device "ADS7846 Touchscreen" |
View serverless.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: emattsan | |
provider: | |
name: aws | |
runtime: ruby2.5 | |
stage: ${opt:stage, 'development'} | |
region: ap-northeast-1 | |
package: | |
exclude: |
View Gemfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
source 'https://rubygems.org' | |
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | |
gem 'sinatra' | |
gem 'sinatra-contrib' | |
gem 'slim' |
View bits.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Bits do | |
require Integer | |
import Integer | |
import Bitwise | |
@doc """ | |
A integer value to a bit list. | |
## example |
View cli.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ExCount.CLI do | |
@opts [ | |
strict: [only_line: :boolean], | |
aliases: [l: :only_line] | |
] | |
def main(args) do | |
args | |
|> OptionParser.parse(@opts) | |
|> show_counts() |
NewerOlder