Skip to content

Instantly share code, notes, and snippets.

@jgarte
jgarte / random_pypi.py
Created January 20, 2022 11:43 — forked from slapslash/random_pypi.py
Get a random selection from the top 5000 PyPI packages and show a short summary of them.
import random
import requests
# will be updated monthly.
top_url = "https://hugovk.github.io/top-pypi-packages/top-pypi-packages-30-days.min.json"
data = requests.get(top_url).json()
packs = [d["project"] for d in data["rows"]]
for _ in range(3):
@jgarte
jgarte / rest-test.lisp
Created January 19, 2022 08:57 — forked from plevexier/rest-test.lisp
caveman2 example
(ql:quickload '(clack caveman2 datafly sxql))
(in-package :cl-user)
(defpackage rest-test
(:use :cl
:clack
:caveman2
:datafly
:sxql))
@jgarte
jgarte / elfeed.el
Created January 19, 2022 08:56 — forked from veer66/elfeed.el
(setq elfeed-feeds
'("http://feeds.feedburner.com/bact"
"https://kitty.in.th/index.php/feed/"
"https://www.unzeen.com/feed/"
"https://dev.to/feed/mrchoke"
"https://dev.to/feed/iporsut"
"http://thep.blogspot.com/feeds/posts/default"
"https://naiwaen.debuggingsoft.com/feed/"
"https://www.blognone.com/taxonomy/term/10564/feed"
"https://www.blognone.com/taxonomy/term/5345/feed"))
;; How to run
;; sbcl --load download-peertube-videos.lisp
(ql:quickload :jonathan)
(ql:quickload :dexador)
(ql:quickload :alexandria)
(ql:quickload :asdf)
(import 'alexandria:assoc-value)
@jgarte
jgarte / jsonparse.lisp
Created January 19, 2022 08:54 — forked from timotheosh/jsonparse.lisp
json parsing in CL
#!/home/thawes/programs/bin/sbcl --script
(load "/home/thawes/.sbclrc")
(require 'cl-json)
;; this is a pathname in CL
(defparameter *file* #P"/home/thawes/src/sources/BibleOrgSys/DataFiles/DerivedFiles/BibleBookOrders_Tables.json")
(json:decode-json-from-source *file*)
@jgarte
jgarte / crlf.php
Created December 3, 2021 01:12 — forked from rossedlin/crlf.php
CRLF
Windows Line Ending \crlf
\crlf
I'm also a Windows Line Ending \crlf
@jgarte
jgarte / tmux-switch-pane.sh
Created November 30, 2021 01:46 — forked from thugcee/tmux-switch-pane.sh
tmux and fzf: fuzzy tmux session/window/pane switcher (this version uses tmux new popup window)
#!/bin/bash
# customizable
LIST_DATA="#{window_name} #{pane_title} #{pane_current_path} #{pane_current_command}"
FZF_COMMAND="fzf-tmux -p --delimiter=: --with-nth 4 --color=hl:2"
# do not change
TARGET_SPEC="#{session_name}:#{window_id}:#{pane_id}:"
# select pane
@jgarte
jgarte / python.md
Created November 29, 2021 11:29 — forked from RobertAKARobin/python.md
Python Is Not A Great Programming Language
@jgarte
jgarte / config.py
Created November 29, 2021 09:50 — forked from jpic/config.py
Dwm-like layout for Qtile ... feels like home ! welcome Qtile B)
class Master(SingleWindow):
defaults = [
("border_focus", "#ff0000", "Border colour for the focused window."),
("border_normal", "#000000", "Border colour for un-focused winows."),
("border_width", 2, "Border width."),
("name", "xmonad-tall", "Name of this layout."),
]
_min_ratio = .1
_max_ratio = .9
@jgarte
jgarte / pantheon.md
Created October 19, 2021 02:16 — forked from worldofpeace/pantheon.md
NixOS Pantheon Docs

Pantheon Desktop

Pantheon is the desktop environment created for the elementary OS distribution. It is written from scratch in Vala, utilizing GNOME technologies with GTK 3 and Granite. All of Pantheon is working in NixOS and the applications should be available, aside from a few exceptions. To enable Pantheon, set

services.xserver.desktopManager.pantheon.enable = true;