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
(function(){ | |
const w = 1920, h = 1080; | |
// Function to make elements non-responsive | |
function makeNonResponsive(element) { | |
const style = window.getComputedStyle(element); | |
const width = style.getPropertyValue('width'); | |
const height = style.getPropertyValue('height'); | |
const position = style.getPropertyValue('position'); | |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
"os/exec" | |
"os/signal" | |
"strconv" | |
"strings" |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
) |
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
FROM node:20.11.1-bookworm-slim | |
ENV NODE_ENV=development | |
WORKDIR /app | |
RUN apt update | |
RUN apt install -y build-essential | |
RUN apt install -y vim wget lynx curl mariadb-client git bash | |
RUN npm i -g ts-node | |
RUN npm i -g jest |
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
(defun string-to-list (string) | |
(mapcar #'princ-to-string (coerce string 'list))) | |
;; (string-to-list "123🚘🚃🚅456") | |
;; > ("1" "2" "3" "🚘" "🚃" "🚅" "4" "5" "6") | |
;; and | |
(defun list-to-string (list) | |
(let ((result "")) |
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
function _json_encode($ar) { | |
$res = ""; | |
if (is_array($ar)) { | |
if (count($ar)==0) { | |
return $res; | |
} | |
if (is_numeric(array_keys($ar)[0])) { | |
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 function parse(lisp: string) { | |
const lexer = /"[^"]*"|\(|\)|[^\s()]+/g; | |
const ts = lisp.match(lexer)!; | |
let i = 0 | |
const rec = () => { | |
let prg: any = undefined | |
while (i < ts.length) { | |
if (ts[i] === '(') { | |
if (!prg) { |
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
(require 'package) | |
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) | |
(package-initialize) | |
(add-to-list 'image-types 'svg) | |
(defvar bootstrap-version) | |
(let ((bootstrap-file | |
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) | |
(bootstrap-version 6)) |
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 { spawn as expectSpawn } from 'node-pty'; | |
export async function expect(cmd: string, expectations: { expected: string, retort: string }[], dir?: string) { | |
let cmdSplit = cmd.split(' ') | |
const p = expectSpawn(cmdSplit.shift()!, cmdSplit, { cwd: dir }) | |
p.onData((data) => { | |
console.log(data) | |
const expected = expectations.shift() |
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
<div id="gameDiv"></div> | |
<h1>Pong</h1> | |
<p>Move the left paddle with W, S</p> | |
<p>Move the right paddle with the arrow keys</p> |