View Orient.cpp
// ,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" |
View topline.rb
# _ _ _ | |
# | |_ ___ _ __| (_)_ _ ___ __ _ __ _ _ __ ___ ___ | |
# | _/ _ \ '_ \ | | ' \/ -_) / _` / _` | ' \/ -_|_-< | |
# \__\___/ .__/_|_|_||_\___| \__, \__,_|_|_|_\___/__/ | |
# |_| |___/ | |
# | |
# application application | |
# | |
# (c) 2013 stephan.com |
View omniauthed.rb
# ___ _ _ __ __ | |
# .' `. (_) / |_[ | | ] | |
# / .-. \ _ .--..--. _ .--. __ ,--. __ _ `| |-'| |--. .---. .--.| | | |
# | | | |[ `.-. .-. | [ `.-. | [ | `'_\ :[ | | | | | | .-. |/ /__\\/ /'`\' | | |
# \ `-' / | | | | | | | | | | | | // | |,| \_/ |,| |, | | | || \__.,| \__/ | | |
# `.___.' [___||__||__][___||__][___]\'-;__/'.__.'_/\__/[___]|__]'.__.' '.__.;__] | |
# | |
# Facebook, Google, Apple, the world? | |
module Omniauthed | |
extend ActiveSupport::Concern |
View unistrike.rb
def unistrike(str) | |
# return "\u0336#{str}".unicode_normalize | |
str.split.map { |c| "\u0336#{c}".unicode_normalize }.join | |
end |
View polynomial_to_s.rb
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 |
View audit_dummy.rb
# ,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 |
View imperial.rb
# ___ _ _ | |
# |_ _|_ __ _ __ ___ _ _(_)__ _| | | |
# | || ' \| '_ \/ -_) '_| / _` | | | |
# |___|_|_|_| .__/\___|_| |_\__,_|_| | |
# |_| | |
module Imperial | |
extend ActiveSupport::Concern | |
included do | |
# options for select menu |
View _poly_picker.html.slim
/ _ ___ _ _ | |
/ _ __ ___| |_ _| _ (_)__| |_____ _ _ | |
/ | '_ \/ _ \ | || | _/ / _| / / -_) '_| | |
/ | .__/\___/_|\_, |_| |_\__|_\_\___|_| | |
/ |_| |__/ s.c14 | |
/ This partial is meant to allow for picking an object of polymorphic type, returning both a type and id | |
/ It is comprised of two select elements, the first of which controls the available choices in the second | |
/ It relies on the poly_picker.js.coffee script on the front end | |
/ It expects to find these locals: |
NewerOlder