Skip to content

Instantly share code, notes, and snippets.

@dirn
dirn / .pylintrc
Created September 25, 2013 13:19
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Profiled execution.
@chebert
chebert / lisp.el
Created September 3, 2017 01:05
chebert-eval-print-last-sexp
(defun multiline? (string)
(position ?\n string))
(defun multiline-comment (string)
(concat "#||\n" string "\n||#\n"))
;; Note: Redefining to send the error message too.
(defun chebert-eval-async (sexp &optional cont package)
"Evaluate EXPR on the superior Lisp and call CONT with the result."
(declare (indent 1))
@Goheeca
Goheeca / braille-pixels.lisp
Last active November 17, 2019 18:36
Braille pixels images using cl-charms (@ SBCL)
#!/usr/bin/sbcl --script
#|
Usage
=====
$ ./braille-pixels.lisp [path]
Main
====
@AdrienLemaire
AdrienLemaire / fabric.plugin.zsh
Created December 27, 2011 05:50
zsh-completion for Fabric in Oh-my-zsh
#compdef fab
_targets() {
_describe -t commands "fabric targets" target_list
}
output_levels=(
'status: Status messages, i.e. noting when Fabric is done running, if the user used a keyboard interrupt, or when servers are disconnected from. These messages are almost always relevant and rarely verbose.'
'aborts: Abort messages. Like status messages, these should really only be turned off when using Fabric as a library, and possibly not even then. Note that even if this output group is turned off, aborts will still occur – there just won’t be any output about why Fabric aborted!'
'warnings: Warning messages. These are often turned off when one expects a given operation to fail, such as when using grep to test existence of text in a file. If paired with setting env.warn_only to True, this can result in fully silent warnings when remote programs fail. As with aborts, this setting does not control actual warning behavior, only whether warning messages are printed or hidden.'
@svetlyak40wt
svetlyak40wt / weblocks-autocomplete.lisp
Created September 24, 2020 20:11
Example of autocompletion box using Weblocks
;; This example illustrates how to call actions from JS and update the widget in response.
;; It is incomplete but could be refactored into reusable library.
;; Hope, somebody will do this some day.
(defpackage #:weblocks-autocomplete
(:use #:cl))
(in-package weblocks-autocomplete)
(ql:quickload '(weblocks log4cl))
@mmontone
mmontone / weblocks-forms.lisp
Last active October 14, 2020 12:47
Weblocks forms with callback support
(defpackage :weblocks/forms
(:use :cl)
(:import-from #:weblocks/actions
#:make-action-url
#:function-or-action->action
#:get-request-action)
(:import-from #:weblocks/html
#:with-html)
(:import-from #:weblocks/request
#:get-path)
@alphapapa
alphapapa / dired.sh
Last active April 4, 2021 09:37
Standalone Dired launcher
#!/bin/bash
# Launch Dired in a plain Emacs configuration.
# Arguments are passed to Emacs, e.g. "-nw" works as expected.
emacs -q "$@" \
--eval "(dired default-directory)" \
--eval "(defun kill-window-or-emacs () (interactive) (if (one-window-p) (kill-emacs) (delete-window)))" \
--eval "(setq dired-dwim-target t delete-by-moving-to-trash t)" \
@mmontone
mmontone / quicksearch.el
Last active May 7, 2021 13:39
Emacs/SLIME frontend to Quicksearch, a search-engine-interface for Common Lisp.
;; Copyright (C) 2021 Mariano Montone
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@fukamachi
fukamachi / quicklisp-badges.markdown
Last active July 19, 2021 21:26
Quicklisp badge

Quicklisp badge

Quickdocs.org now provides project badges for Quicklisp projects. It shows Quicklisp dist version when the project was updated last.

Once the project owner adds this badge to their README file, it will inform the project is ready for Quicklisp and its documentation is available on Quickdocs.org.

Stability

It's available, however it was just added in this morning at whim and it may still have issues. Please try it and tell @nitro_idiot if you encountered any issues.

@ivan4th
ivan4th / 1password.lisp
Created June 24, 2022 23:37
Inecobank scraping
(in-package :yobabank)
(defparameter *1pw-secure-note-name* "Yobabank Data")
(defparameter *1pw-vault* "Personal")
(defun 1pw-get-field (object name)
(when (typep object 'st-json:jso)
(st-json:getjso name object)))
(defun 1pw-get-id (object)