Skip to content

Instantly share code, notes, and snippets.

View usualoma's full-sized avatar
🏠
Working from home

Taku Amano usualoma

🏠
Working from home
View GitHub Profile
if (userAgent.name === "Safari") {
// reCAPTCHA has a critical bug on Safari
if (window.innerWidth > 512) {
try {
window.innerWidth = 512;
} catch (e) {
// ignore
}
}
}
CREATE TABLE `注文` (
`内容` TINYTEXT CHARACTER SET utf8mb4
);
server {
listen 80;
server_name default_server;
set $secret_token 'ohkoNgi4quaoxahl'; # `$ pwgen 16 1`
set $base64 'dGVzdDp0ZXN0'; # `$ echo -n 'test:test' | base64`
location = /.secret-token-required.html {
if ($http_authorization = "Basic $base64") {
add_header Set-Cookie "secret_token=$secret_token;Path=/;Max-Age=31536000";
server {
listen 80;
server_name default_server;
location / {
proxy_pass http://backend;
}
}
$ docker images --format "{{.Repository}}:{{.Tag}} {{.Size}}" | grep 2.4.0-
usualoma/ruby-with-therubyracer:2.4.0-alpine 115 MB
usualoma/ruby-with-therubyracer:2.4.0-slim 270 MB
ruby:2.4.0-alpine 60.6 MB
ruby:2.4.0-slim 223 MB
<mt:FilteredEntries filter="blog-general-news OR show-in-general-news">
<mt:EntriesHeader><ul></mt:EntriesHeader>
<li><mt:EntryTitle /></li>
</mt:EntriesFooter></ul></mt:EntriesFooter>
</mt:FilteredEntries>
#!/bin/sh
curl 'https://example.com/mt/mt-data-api.cgi/v3/filtered-objects/entries?filter=blog-general-news+OR+show-in-general-news'
#!/bin/sh
curl 'https://example.com/mt/mt-data-api.cgi/v3/filtered-objects/entries?filter=wanted'
<mt:FilteredEntries filter="wanted">
<mt:EntriesHeader><ul></mt:EntriesHeader>
<li><mt:EntryTitle /></li>
</mt:EntriesFooter></ul></mt:EntriesFooter>
</mt:FilteredEntries>
#coding:utf-8
import random
def zundoko_generator():
while True:
yield random.choice(['ズン','ドコ'])
def zundoko_kiyoshi(generator):
c = 0
while True: