This file contains hidden or 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
// ,88~-_ ,e, d8 | |
// d888 \ 888-~\ " e88~~8e 888-~88e _d88__ | |
// 88888 | 888 888 d888 88b 888 888 888 | |
// 88888 | 888 888 8888__888 888 888 888 | |
// Y888 / 888 888 Y888 , 888 888 888 | |
// `88_-~ 888 888 "88___/ 888 888 "88_/ | |
// | |
// persistent orientation for M5StickC | |
#include "Orient.h" |
This file contains hidden or 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
# _ _ _ | |
# | |_ ___ _ __| (_)_ _ ___ __ _ __ _ _ __ ___ ___ | |
# | _/ _ \ '_ \ | | ' \/ -_) / _` / _` | ' \/ -_|_-< | |
# \__\___/ .__/_|_|_||_\___| \__, \__,_|_|_|_\___/__/ | |
# |_| |___/ | |
# | |
# application application | |
# | |
# (c) 2013 stephan.com |
This file contains hidden or 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
# ___ _ _ __ __ | |
# .' `. (_) / |_[ | | ] | |
# / .-. \ _ .--..--. _ .--. __ ,--. __ _ `| |-'| |--. .---. .--.| | | |
# | | | |[ `.-. .-. | [ `.-. | [ | `'_\ :[ | | | | | | .-. |/ /__\\/ /'`\' | | |
# \ `-' / | | | | | | | | | | | | // | |,| \_/ |,| |, | | | || \__.,| \__/ | | |
# `.___.' [___||__||__][___||__][___]\'-;__/'.__.'_/\__/[___]|__]'.__.' '.__.;__] | |
# | |
# Facebook, Google, Apple, the world? | |
module Omniauthed | |
extend ActiveSupport::Concern |
This file contains hidden or 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
def unistrike(str) | |
# return "\u0336#{str}".unicode_normalize | |
str.split.map { |c| "\u0336#{c}".unicode_normalize }.join | |
end |
This file contains hidden or 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
POWERS = ['', '', '²', '³', '⁴'].freeze | |
def poly_to_s(coefs) | |
coefs.each_with_index.inject('') do |str, (coef, index)| | |
term = if index == 4 | |
[coef] | |
else | |
[coef.positive? ? '+' : '-', ' ', coef.abs] | |
end | |
term << 'x' if index > 1 |
This file contains hidden or 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
# ,ggg, | |
# dP""8I 8I I8 | |
# dP 88 stephan.com 8I I8 | |
# dP 88 presentsL 8I gg 88888888 | |
# ,8' 88 8I "" I8 | |
# ,gggggggggggg, d88888888 gg gg ,gggg,8I gg I8 | |
# dP"""88""""""Y8b, __ ,8" 88 I8 8I dP" "Y8I 88 I8 | |
# Yb, 88 `8b, dP" ,8P Y8 I8, ,8I i8' ,8I 88 ,I8, | |
# `" 88 `8b Yb,_,dP `8b,,d8b, ,d8b,,d8, ,d8b,_,88,_,d88b, | |
# 88 Y8 "Y8P" `Y88P'"Y88P"`Y8P"Y8888P"`Y88P""Y88P""Y8 |
This file contains hidden or 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
# ___ _ _ | |
# |_ _|_ __ _ __ ___ _ _(_)__ _| | | |
# | || ' \| '_ \/ -_) '_| / _` | | | |
# |___|_|_|_| .__/\___|_| |_\__,_|_| | |
# |_| | |
module Imperial | |
extend ActiveSupport::Concern | |
included do | |
# options for select menu |
This file contains hidden or 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 'blink1' | |
RSpec.configure do |config| | |
config.around(:each) do |example| | |
Blink1.open do |blink1| | |
blink1.set_rgb(0, 0, 255) | |
example.run | |
blink1.set_rgb(255, 255, 0) | |
end | |
end | |
end |