I hereby claim:
- I am aquarla on github.
- I am aquarla (https://keybase.io/aquarla) on keybase.
- I have a public key whose fingerprint is C42C F2CB 24A5 4FC2 CBA8 72F3 CC80 85B9 4364 8C26
To claim this, I am signing this object:
# coding: utf-8 | |
def ( ) | |
(1.. ).each do | | | |
if % 15 == 0 | |
print ' ' | |
elsif % 3 == 0 | |
print ' ' | |
elsif % 5 == 0 | |
print ' ' | |
else |
export default function pseudoSnowflake() { | |
const now = new Date(); | |
const time = now.getTime(); | |
return (BigInt(time) << BigInt(16) + BigInt(Math.floor(Math.random(2**16)))).toString(); | |
} |
/* | |
* PrismaではDatetime型を取り出すときのタイムゾーンが指定できない(固定でUTC)になってしまう | |
* ため、強制的に9時間マイナスしてJSTに補正する | |
*/ | |
export default function convertTimezone(obj) { | |
return { | |
...obj, | |
createdAt: new Date(Date.parse(obj.createdAt) - 1000 * 60 * 60 * 9), | |
updatedAt: new Date(Date.parse(obj.updatedAt) - 1000 * 60 * 60 * 9), | |
} |
# coding: utf-8 | |
100.times do |n| | |
str = "" | |
20.times do |i| | |
5.times do |j| | |
str += (rand(9)+1).to_s + "×" + (rand(9)+1).to_s + "= " | |
end | |
str += "\n" | |
end |
require 'net/https' | |
require 'rss' | |
def lambda_handler(event:, context:) | |
iwatedon_api_url = 'https://enter-your-mastodon-domain/api/v1/statuses' | |
access_token = 'enter-your-access-token' | |
urls = [ | |
'rss url 1', | |
'rss url 2', | |
'rss url 3', |
I hereby claim:
To claim this, I am signing this object:
require 'selenium-webdriver' | |
mode = "firefox" | |
if mode == "firefox" | |
options = Selenium::WebDriver::Firefox::Options.new | |
options.add_argument('-headless') | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
profile["intl.accept_languages"] = "ja,en-us,en" |
@-moz-document url-prefix("https://iwatedon.net/") { | |
div.drawer { | |
width: 10px; | |
} | |
div.drawer:hover { | |
width: 300px; | |
} | |
} |
# -*- coding: utf-8 -*- | |
class Array | |
# 配列を要素数が出来るだけ均等になるようにn個に分割 | |
def split_into(n) | |
sizes = (0...n).collect { |i| | |
(size % n >= (i+1)) ? (size / n + 1) : (size / n) | |
} | |
(0...n).collect { |i| slice(sizes[0,i].inject(0, :+), sizes[i]) } |