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 '[clojure.java.io :as io]) | |
| (import (java.util.prefs Preferences)) | |
| (defn- check [] | |
| (-> (Preferences/userRoot) | |
| .keys seq) | |
| (-> (Preferences/userRoot) | |
| (.get "foo" "NONE!")) | |
| (-> (io/file (System/getProperty "user.home") ".java" ".userPrefs") | |
| .list seq)) |
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
| (defn combinations [xs] | |
| (loop [xs xs | |
| as []] | |
| (if-let [[x & xs] xs] | |
| (recur xs (concat as (map #(vector x %) xs))) | |
| as))) | |
| (combinations (range 3)) | |
| ;; => ([0 1] [0 2] [1 2]) | |
| (combinations (range 4)) |
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.nio.file Files) | |
| (java.nio.file.attribute FileAttribute PosixFilePermissions)) | |
| (Files/createTempDirectory (.toPath (io/file ".")) | |
| "temp-" | |
| (into-array FileAttribute [])) | |
| (Files/createTempDirectory (.toPath (io/file ".")) | |
| "temp-" | |
| (into-array FileAttribute [(-> "rwx------" |
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
| (boot.core/set-env! :dependencies '[[org.seleniumhq.selenium/selenium-java "3.141.59"]]) | |
| (import (org.openqa.selenium WebDriver WebElement) | |
| (org.openqa.selenium.remote RemoteWebElement) | |
| (org.openqa.selenium.chrome ChromeDriver)) | |
| (def d (atom nil)) | |
| (reset! d (ChromeDriver.)) | |
| (.get @d "http://example.com/") |
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 apply-autoimport-to-gore (args) | |
| (unless (null args) | |
| (let ((a (car args))) | |
| (add-to-list 'a "-autoimport") | |
| (setcar args a))) | |
| args) | |
| (advice-add 'gorepl--run-gore :filter-args 'apply-autoimport-to-gore) | |
| ;; (advice-remove 'gorepl--run-gore 'apply-autoimport-to-gore) |
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
| ;;; HITACHIの冷蔵庫のスペックを一括取得 | |
| ;;; 容量、発売年、消費電力の比較の為 | |
| ;;; PDF からしか情報が取れないものは無視して、HTML から取れるものだけが対象 | |
| (boot.core/set-env! :dependencies '[[org.seleniumhq.selenium/selenium-java "3.9.1"]]) | |
| (require '[clojure.string :as str] | |
| '[clojure.set :refer [rename-keys]]) | |
| (import (org.openqa.selenium By WebDriver WebElement) | |
| (org.openqa.selenium.chrome ChromeDriver ChromeOptions)) |
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
| (boot.core/set-env! :dependencies '[;; https://mvnrepository.com/artifact/org/jaudiotagger | |
| [org/jaudiotagger "2.0.3"]]) | |
| ;; OR | |
| #_(boot.core/merge-env! :repositories | |
| [["Mulesoft " {:url "https://repository.mulesoft.org/nexus/content/repositories/public/"}]] | |
| :dependencies | |
| '[ | |
| ;; https://mvnrepository.com/artifact/com.github.goxr3plus/jaudiotagger | |
| [com.github.goxr3plus/jaudiotagger "V2.2.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
| Order Allow,Deny | |
| <Files ~ "\.(html|js|css|ico|gif|jpg|png)$"> | |
| Allow from all | |
| </Files> |
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
| // javascript:var c=( | |
| (d,s)=>{var a,b,u,r;a=d.createElement('div');u=a.style;u.position='fixed';u.top='200%';b=d.createElement('pre');b.style.userSelect='auto';a.appendChild(b).textContent=s;d.body.appendChild(a);d.getSelection().selectAllChildren(a);r=d.execCommand('copy');d.body.removeChild(a);return r;} | |
| // );c(document,'1234'); |
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
| ((G,D,B)=>{ | |
| var T,U,s,i,c,b,m; | |
| c=(t)=>D.createElement(t); | |
| b=c('div'); | |
| s=b.style; | |
| s.width='100%'; | |
| s.height='100%'; | |
| s.background='#0008'; | |
| s.position='fixed'; | |
| s.top=0; |