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 | |
;; gcal emphasizes the current day with angle brackets (e.g "< 1>"). | |
;; it doesn't support highlighting in a different color. | |
;; use this script to replace gcal's default highlighting with red: | |
;; | |
;; $ gcal . | gcal_highlighter | |
(require '[clojure.string :as str]) |
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 | |
(ns Konto | |
(:require [clojure.string :as str] | |
[babashka.process :refer [shell]] | |
[clojure.pprint :refer [cl-format]] | |
[babashka.cli :as cli] | |
[babashka.fs :as fs] | |
[clojure.data.csv :as csv] | |
[clojure.java.io :as io])) |
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 | |
(require '[clojure.string :as str] | |
'[babashka.process :refer [shell process]] | |
'[clojure.tools.cli :refer [parse-opts]]) | |
(def cli-opts [["-h" "--help" "Show help"] | |
["-y" "--year YEAR" "Year (default to current year)"]]) | |
(defn usage [options-summary] |
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 | |
; // this is minimal typst template, you could use with this script: | |
; #let conf( | |
; // the variables below *must* be defined in the yaml frontmatter of your markdown file | |
; (font, foo, bar), | |
; doc, | |
; ) = { | |
; // set the font in the yaml frontmatter of your markdown file | |
; set text( |
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
// Drop this script in the Editor folder of your project | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Reflection; | |
using System.Linq; | |
using System.IO; | |
public class CreatePrefabWindow : EditorWindow |
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
// first naive, straight-forward solution: | |
function divides(a,b) { | |
return a % b === 0; | |
} | |
for (i=1; i<20; i++) { | |
if (divides(i,3) && divides(i,5)) { | |
console.log("fizzbuzz"); | |
} else if (divides(i,3)) { |
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 | |
; kolja (@01k) 2020 | |
; | |
; usage: | |
; | |
; create a directory where you would like to keep your bookmarks. | |
; create an env variable NNN_BMDIR with the path to that directory (e.g. "~/.config/nnn/bookmarks") | |
; save this file in ~/.config/nnn/plugins as "bookmark" (for example) | |
; |
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
/* this is not the solution you are looking for. Move along */ | |
ul { | |
list-style-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='40' viewBox='-1 -1 2 2'><circle transform='translate(0,-1.7)' r='1' /><circle transform='translate(0,0.95)' r='1' /></svg>"); | |
line-height: 0.6rem; | |
} |
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 bash | |
"exec" "plk" "-Sdeps" "{:deps {org.clojure/tools.cli {:mvn/version \"0.4.2\"}}}" "-Ksf" "$0" "$@" | |
(ns subtitles.core | |
(:require | |
[planck.http :as http] | |
[planck.core :as core] | |
[clojure.tools.cli :refer [parse-opts]] | |
[clojure.string :as s])) | |
(def help " |
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 split = (arr, fn) => arr.reduce(([first, ...rest],el) => | |
fn(el) | |
? first.length ? [[], first, ...rest] : [[], ...rest] | |
: first.length ? [[...first, el], ...rest] : [[el], ...rest] | |
, [[]]).reverse() | |
const a = [...Array(12).keys()] | |
split(a, x => !(x%5)) | |
// [ [ 1, 2, 3, 4 ], [ 6, 7, 8, 9 ], [ 11 ] ] |
NewerOlder