Skip to content

Instantly share code, notes, and snippets.

View Googlefan256's full-sized avatar
💭
Its Me! Googlefan.

Googlefan256

💭
Its Me! Googlefan.
View GitHub Profile
@Googlefan256
Googlefan256 / Makefile
Created October 22, 2023 08:48
tiny-python
FROM gcr.io/distroless/python3 AS distroless
FROM scratch
COPY --from=distroless /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libpthread.so.0
COPY --from=distroless /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libdl.so.2
COPY --from=distroless /lib/x86_64-linux-gnu/libutil.so.1 /lib/x86_64-linux-gnu/libutil.so.1
COPY --from=distroless /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libm.so.6
COPY --from=distroless /lib/x86_64-linux-gnu/libexpat.so.1 /lib/x86_64-linux-gnu/libexpat.so.1
COPY --from=distroless /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1
COPY --from=distroless /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6
COPY --from=distroless /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
@Googlefan256
Googlefan256 / gas.js
Created September 3, 2022 13:53
Gasでgoogle translateを自動言語検知ありで使えるやつです
function translate(text, from = "auto", to) {
try {
const result = UrlFetchApp.fetch(
"https://translate.google.com/_/TranslateWebserverUi/data/batchexecute",
{
payload:
"f.req=" +
encodeURIComponent(
JSON.stringify([
[