This file contains 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
CREATE OR REPLACE FUNCTION public.rpc_pokemon() | |
RETURNS text | |
LANGUAGE plv8 | |
STRICT | |
AS $function$ | |
var __rpc=(()=>{var mo=Object.create;var Ie=Object.defineProperty;var vo=Object.getOwnPropertyDescriptor;var go=Object.getOwnPropertyNames;var So=Object.getPrototypeOf,xo=Object.prototype.hasOwnProperty;var re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ko=(e,t)=>{for(var r in t)Ie(e,r,{get:t[r],enumerable:!0})},nr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of go(t))!xo.call(e,l)&&l!==r&&Ie(e,l,{get:()=>t[l],enumerable:!(n=vo(t,l))||n.enumerable});return e};var Me=(e,t,r)=>(r=e!=null?mo(So(e)):{},nr(t||!e||!e.__esModule?Ie(r,"default",{value:e,enumerable:!0}):r,e)),wo=e=>nr(Ie({},"__esModule",{value:!0}),e);var lr=re(or=>{"use strict";(function(e){function t(){}function r(){}var n=String.fromCharCode,l={}.toString,o=l.call(e.SharedArrayBuffer),u=l(),i=e.Uint8Array,s=i||Array,a=i?ArrayBuffer:s,c=a.isView||function(y){return y&&"length"in y},h=l.call(a.prototype);a=r.proto |
This file contains 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
import { Application } from "https://deno.land/x/[email protected]/mod.ts"; | |
const app = new Application(); | |
app.use((ctx) => { | |
ctx.response.body = "Hello World! ini1"; | |
console.log(ctx); | |
}); | |
await app.listen({ port: 8000 }); |
This file contains 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
const { createClient } = require("@supabase/supabase-js"); | |
const OLD_PROJECT_URL = "https://xxx.supabase.co"; | |
const OLD_PROJECT_SERVICE_KEY = "old-project-service-key-xxx"; | |
const NEW_PROJECT_URL = "https://yyy.supabase.co"; | |
const NEW_PROJECT_SERVICE_KEY = "new-project-service-key-yyy"; | |
(async () => { | |
const oldSupabaseRestClient = createClient( |
This file contains 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
convert image.png -colorspace YUV -sampling-factor 4:2:2 -separate \ | |
\( -clone 0 \) \ | |
\( -clone 1 -fill black -colorize 100% \) \ | |
\( -clone 1 -negate \) \ | |
\( -clone 1 \) \ | |
image_b_temp.png | |
convert image_b_temp-4.png image_b_temp-5.png image_b_temp-6.png -channel RGB -combine image_b.png | |
convert image.png -colorspace YUV -sampling-factor 4:2:2 -separate \ |
This file contains 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
<html> | |
<body> | |
<div class="jank-detector"> | |
Random numbers, to highlight jank: | |
<span class="rand"></span> | |
</div> | |
<script> | |
const rand = document.querySelector(".rand"); | |
function randFrame() { | |
rand.textContent = Math.random(); |
This file contains 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
const img = new Image(); | |
img.src = "cat.png"; | |
img.decode().then(() => { | |
// image fully decoded and can be safely rendered on the screen | |
const orig = document.getElementById("orig"); | |
orig.parentElement.replaceChild(img, orig); | |
}); |
This file contains 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
function modifyURL(url) { | |
// ect can be 'slow-2g', '2g', '3g', or '4g'. | |
const connectionType = navigator.connection.effectiveType; | |
if (connectionType === "slow-2g" || connectionType === "2g") { | |
return url + "?opt=aggressive"; | |
} else if (connectionType === "4g") { | |
return url + "?opt=mild"; | |
} else { | |
return url + "?opt=default"; | |
} |
This file contains 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
var fs = require('fs'); | |
var Hapi = require('hapi'); | |
var http2 = require('http2'); | |
var options = { | |
key: fs.readFileSync('./selfsigned.key'), | |
cert: fs.readFileSync('./selfsigned.crt'), | |
}; | |
var server = new Hapi.Server(); |
This file contains 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
const http2 = require('http2'); | |
const fs = require('fs'); | |
const options = { | |
key: fs.readFileSync('./selfsigned.key'), | |
cert: fs.readFileSync('./selfsigned.crt'), | |
allowHTTP1: true | |
} | |
const server = http2.createSecureServer(options, (req, res) => { |
This file contains 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
try { | |
navigator.serviceWorker.getRegistrations().then(function(registrations) { | |
registrations.forEach(function(registration) { | |
if (registration.active && registration.active.scriptURL.includes("dexecure")) { | |
console.log('removing registration', registration); | |
registration.unregister(); | |
} | |
}) | |
}) | |
} catch (e) { |
NewerOlder