This file contains hidden or 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
<canvas id="c"><script>t=c.getContext("2d"),s=150,a=[];for(i=s*s;i--;)a[i]=Math.random()<.1;setInterval(_=>{b=[],t.clearRect(0,0,s,s);for(i=s*s;i--;){n=0;for(j=9;j--;)n+=a[(~~(i/s)+s+j%3-1)%s*s+(i+s+~~(j/3)-1)%s];b[i]=n==3||n-a[i]==3,a[i]&&t.fillRect((i%s),~~(i/s),1,1)}a=b},s)</script> |
This file contains hidden or 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 canvas = document.querySelector("canvas") | |
canvas.width = 800, canvas.height = 600 | |
canvas.style.width = `${canvas.width / devicePixelRatio}px` | |
const gl = canvas.getContext("webgl") | |
const vertexShader = gl.createShader(gl.VERTEX_SHADER) | |
const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER) | |
gl.shaderSource(vertexShader, ` |
This file contains hidden or 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
<!DOCTYPE html> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>WebGL Chart</title> | |
<span id="fps">Loading</span> | |
<canvas></canvas> | |
<style> | |
body { |
This file contains hidden or 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
((document, location, navigator) => { | |
const domain = location.hostname.split(".") | |
const match = document.cookie.match(/(^|; ?)_ga=GA1\.\d\.(\d+\.\d+)(;|$)/) | |
// use existing client id or generate one | |
const cid = match ? match[2] : ~~(2147483648 * Math.random()) + "." + ~~(Date.now() / 1000) | |
// set cookie at highest possible domain level | |
for (let i = domain.length; i--;) { | |
const cookie = `_ga=GA1.${domain.length - i}.${cid}` |
This file contains hidden or 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 { dirname, extname, resolve } from "https://deno.land/std/path/mod.ts"; | |
const MODE_EVAL = 0; | |
const MODE_ESCAPED = 1; | |
const MODE_RAW = 2; | |
interface Range { | |
source: [number, number]; | |
code: [number, number]; | |
} |
This file contains hidden or 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
export const MSAL_OAUTH_URL = | |
"https://login.microsoftonline.com/consumers/oauth2/v2.0"; | |
export const MSAL_OAUTH_DEVICE_AUTHORIZATION_ENDPOINT = | |
`${MSAL_OAUTH_URL}/devicecode`; | |
export const MSAL_OAUTH_TOKEN_ENDPOINT = `${MSAL_OAUTH_URL}/token`; | |
export const XBOX_AUTH_ENDPOINT = | |
"https://user.auth.xboxlive.com/user/authenticate"; |
This file contains hidden or 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
input_registers: | |
- name: protocol_number | |
data_type: uint32 | |
address: 4950 | |
- name: protocol_version | |
data_type: uint32 | |
address: 4952 | |
- name: arm_software_version | |
data_type: string | |
address: 4954 |
This file contains hidden or 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
SELECT | |
year, | |
date_trunc('week', make_date(year, 1, 4))::date AS start, -- first calendar week always contains January 4th. | |
extract(week from make_date(year + 1, 1, 4) - 7) AS weeks | |
FROM generate_series(2000, 2030) t(year); |
This file contains hidden or 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 lib = Deno.dlopen( | |
Deno.env.get("DENO_SSL_PATH")!, | |
{ | |
AES_set_encrypt_key: { | |
parameters: ["buffer", "u32", "buffer"], | |
result: "i32", | |
}, | |
AES_cfb8_encrypt: { | |
parameters: [ | |
"buffer", |
This file contains hidden or 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
#!/usr/bin/env -S deno run -A | |
// you might need to specify a different chrome executable because of a bug | |
// https://github.com/lucacasonato/deno-puppeteer/issues/65 | |
// PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable (on my linux system) | |
import { OAuthClient } from "https://deno.land/x/[email protected]/auth/mod.ts"; | |
import puppeteer from "https://deno.land/x/[email protected]/mod.ts"; | |
const oauthClient = new OAuthClient({ |
OlderNewer