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
| (ns email-edit.core | |
| (:import | |
| java.util.Base64)) | |
| (def encoder (Base64/getMimeEncoder)) | |
| (def decoder (Base64/getMimeDecoder)) | |
| (defn decode [^String s] | |
| (String. (.decode decoder s))) | |
| (defn encode [^String s] |
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 bb -i | |
| ;; Usage: | |
| ;; Install babashka at https://github.com/babashka/babashka | |
| ;; put this script on PATH and make it executable | |
| ;; copy logs to the clipboard | |
| ;; to filter SimpleAsyncTaskExecutor-3 run | |
| ;; pbpaste | slct.clj 3 | |
| (require '[clojure.string :as string]) |
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 java.awt.*; | |
| import java.time.LocalDateTime; | |
| public class MouseMover { | |
| public static final int PAUSE = 20000; | |
| public static void main(String... args) throws Exception { | |
| int limit = args.length == 0 ? 24 : Integer.parseInt(args[0]); | |
| System.out.println("Time limit: " + limit); |
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
| (ns test.core | |
| (:import [java.awt.datatransfer DataFlavor StringSelection Transferable])) | |
| (defn clipboard [] | |
| (.getSystemClipboard (java.awt.Toolkit/getDefaultToolkit))) | |
| (defn slurp-clipboard [] | |
| (.getTransferData (.getContents (clipboard) nil) (DataFlavor/allHtmlFlavor))) | |
| (def html-flavors |
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
| -- run as cat sqlite.sql | sqlite3 | |
| CREATE TABLE ichiba ( | |
| disp_date INTEGER, | |
| genre3_id INTEGER, | |
| gms REAL, | |
| order_cnt INTEGER | |
| ); | |
| .mode tabs |
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
| setInterval(() => document.body.querySelector('.video-button').click(), 1000); |
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
| (ns test.encoder | |
| (:require | |
| [clojure.string :as string])) | |
| (def alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZ") | |
| (def alphabet? (set alphabet)) | |
| (def a->i (zipmap alphabet (range 1 27))) | |
| (def i->a (zipmap (range 1 27) alphabet)) |
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
| var net = require('net'); | |
| const evalToBuffer = d => { | |
| try { | |
| const result = eval(d.toString()); | |
| return Buffer.from(result + '\n', "utf-8"); | |
| } catch (e) { | |
| return Buffer.from(e + '\n', "utf-8"); | |
| } | |
| }; |
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
| IFn loadString = clojure.java.api.Clojure.var("clojure.core", "load-string"); | |
| loadString.invoke("(require '[clojure.core.server :as s]) (defonce _ (s/start-server {:port 7000 :name \"hi\" :accept 'clojure.core.server/repl}))"); | |
| // rlwrap telnet localhost 7000 | |
| // also | |
| public static void bind(String k, Object v) { | |
| String src = String.format("(in-ns 'user) #(def %s %%)", k); | |
| ((IFn) loadString.invoke(src)).invoke(v); |
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> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Video</title> | |
| </head> | |
| <body> | |
| <video autoplay controls loop> | |
| <source src="video.mp4" type="video/mp4"> | |
| Your browser does not support the video tag. |