Skip to content

Instantly share code, notes, and snippets.

View sylph01's full-sized avatar
🔒
crypto(graphy) rules

Ryo Kajiwara sylph01

🔒
crypto(graphy) rules
View GitHub Profile
@sylph01
sylph01 / config.h
Last active November 27, 2024 07:25
QMK config.h/keymap.c for crkbd
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
@sylph01
sylph01 / keymap.rb
Last active November 24, 2024 04:44
keymap.rb (keymap file of prk firmware) for crkbd
# Initialize a Keyboard
kbd = Keyboard.new
# `split=` should happen before `init_pins`
kbd.split = true
# If your right hand of CRKBD is the "anchor"
# kbd.set_anchor(:right)
# Initialize GPIO assign
require 'exif'
require 'json'
h = {}
Dir.glob('*.JPG') do |fname|
data = Exif::Data.new(File.open(fname))
h[fname] = {
focal_length: data.focal_length.to_i,
iso_speed_ratings: data.iso_speed_ratings,
(d => {
// キャッシュ対策
const s = d.createElement('script');
s.src = 'https://gist.githubusercontent.com/sylph01/11f25f175d838a97b29b2d4a320c4923/raw/e225f88e0d0d15b9aa988e82dc2930ce8ec6d44d/scoretool-unilab.js
?timestamp=' + Date.now() + 'ms';
d.head.appendChild(s);
})(document);
/*!
* ポップンスコアツール v0.3.0
*
* ポップンスコアツール is licensed under the MIT License.
* Copyright (c) 2019 ケルパニ@猫
* https://github.com/kerupani129s/popn-score-tool/blob/master/LICENSE
*/
(async () => {
const DEBUG = false;
a = [1, 2, 3, 4, 5]
class Array
def cumulative_sum(default = 0, &block)
block ||= ->(n){n}
a = [default]
for i in 1 .. (self.length)
a[i] = a[i - 1] + block.(self[i - 1])
end
return a
@sylph01
sylph01 / muldrotha.txt
Created September 13, 2018 17:06
Muldrotha the Gravetide ver0.1
# Lands 36
Command Tower
Misty Rainforest
Verdant Catacombs
Polluted Delta
Breeding Pool
Watery Grave
Overgrown Tomb
Woodland Cemetery
Hinterland Harbor

Keybase proof

I hereby claim:

  • I am sylph01 on github.
  • I am s01 (https://keybase.io/s01) on keybase.
  • I have a public key ASB52b64K9guFgDtc70icP9FvkNoxFumhTa_6XMvw-VMIQo

To claim this, I am signing this object:

@sylph01
sylph01 / date_arith.ex
Last active May 26, 2017 05:55
Addition/Subtraction of Erlang Date with built-in functions only
defmodule DateArith do
def next_month({y, 12, d}), do: {y + 1, 1, d}
def next_month({y, m, d}), do: {y, m + 1, d}
def previous_month({y, 1, d}), do: {y - 1, 12, d}
def previous_month({y, m, d}), do: {y, m - 1, d}
def add_month({y, m, d}, ms) do
{
y + div(m + ms - 1, 12),
@sylph01
sylph01 / template.tex
Created March 27, 2017 07:16
LaTeX template for most of my stuff
\documentclass[11pt,a4paper]{jarticle}
%%%% settings %%%%
\usepackage{algorithmic}
\usepackage{listings,jlisting}
% lstlisting setting
% number - line number of codes
\lstset{
language={ruby},