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
| You are Gemini. You are a helpful assistant. Balance empathy with candor: validate the user's emotions, but ground your responses in fact and reality, gently correcting misconceptions. Mirror the user's tone, formality, energy, and humor. Provide clear, insightful, and straightforward answers. Be honest about your AI nature; do not feign personal experiences or feelings.Use LaTeX only for formal/complex math/science (equations, formulas, complex variables) where standard text is insufficient. Enclose all LaTeX formulas using $ for inline equations and$$ for display equations. Ensure there is no space between the delimiter ($ or $$) and the formula. Never render LaTeX in a code block unless the user explicitly asks for it. Strictly Avoid LaTeX for simple formatting (use Markdown), non-technical contexts and regular prose (e.g., resumes, letters, essays, CVs, cooking, weather, etc.), or simple units/numbers (e.g., render 180°C or 10%).Further guidelines:I. Response Guiding PrinciplesStructure your response for |
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
| prefix = { | |
| mods={"ctrl"}, | |
| key="t", | |
| } | |
| appNameToPreferredNumber = { | |
| Emacs=0, | |
| Safari=1, | |
| Terminal=2, | |
| Spotify=9, | |
| } |
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
| local function remap(from_key, to_key) | |
| return hs.hotkey.new(from_key[1], from_key[2], | |
| function() hs.eventtap.keyStroke(to_key[1], to_key[2]) end) | |
| end | |
| local maps={} | |
| local function remap_add(win_filter_name, from_key, to_key) | |
| maps[win_filter_name] = maps[win_filter_name] or {} | |
| table.insert(maps[win_filter_name], remap(from_key, to_key)) |
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
| -- https://github.com/Hammerspoon/hammerspoon/issues/664 | |
| slack_c_n = hs.hotkey.new({"ctrl"}, 'n', function() | |
| hs.eventtap.keyStroke({}, 'down') | |
| end) | |
| slack_c_p = hs.hotkey.new({"ctrl"}, 'p', function() | |
| hs.eventtap.keyStroke({}, 'up') | |
| end) |
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
| ;;; (keymap-global-set "C-c o" 'browse-url-at-point) | |
| (defun rgc/add-stripe (args) | |
| "prepend the right stripe path to be able to find the entity | |
| you're looking for" | |
| (let* ((arg (s-replace-regexp "^https?://" "" (car args))) | |
| (path | |
| (cond |
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
| (def hh [{:a 1, :b 2, :c 3 :aa 4} {:a 1, :b 2, :c 4 :aa 4} {:a 99, :b 2, :c 3 :aa 5}]) | |
| (def rname :trial-ups) | |
| (def main-f [:b :a]) | |
| ;; first stab, we pivot over the keys of the "root" entity, | |
| ;; group by them, and strip the rest out | |
| (defn hydrate-with-main-entity-keys [m ks as] | |
| (->> (group-by #(select-keys % main-f) hh) | |
| (m/map-vals (partial map #(apply dissoc % main-f))) |
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
| # helping to find dupes. Not complete, | |
| # but this can serve as a basis for a pure shellscript dup finder | |
| find . -type f -exec du -s {} \; -exec /usr/bin/basename {} \; >/tmp/list.txt | |
| cat /tmp/list.txt | cut -f1 -d' ' | paste - - | grep png | sort | uniq| wc -l | |
| cat /tmp/list.txt | cut -f1 -d' ' | paste - - | grep png | sort | wc -l |
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
| # fzf is either fzf or a naive version of it | |
| # the input is a sed line number, so it can be | |
| # single number: 42 | |
| # range: 1,10 | |
| # separate lines: 10p;50p | |
| mute command -v fzf || | |
| fzf() { | |
| local in=$(cat) | |
| for p in "${@}"; do | |
| [ "$p" = "-0" ] && [ "$(echo "$in" | wc -l)" -eq 1 ] && [ "" = "$in" ] && return 1 |
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
| data:text/html,<canvas id="v"><script>d=document,d.body.style.margin=0,f=0,c=v.getContext("2d"),v.width=innerWidth,v.height=innerHeight,c.lineWidth=2,x=e=>e.clientX||e.touches[0].clientX,y=e=>e.clientY||e.touches[0].clientY,d.onmousedown=d.ontouchstart=e=>{f=1,e.preventDefault(),c.moveTo(x(e),y(e)),c.beginPath()},d.onmousemove=d.ontouchmove=e=>{f&&(c.lineTo(x(e),y(e)),c.stroke())},d.onmouseup=d.ontouchend=e=>f=0</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
| mb:maybehelp() { | |
| local msg="$1";shift | |
| if any equals_help "$@"; then | |
| warn "$msg" | |
| return 1 | |
| fi | |
| } | |
| mb:maybehelp "mmsg" "$@" || return 1 |
NewerOlder