Skip to content

Instantly share code, notes, and snippets.

@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)
@no-defun-allowed
no-defun-allowed / dbyol.org
Last active January 7, 2024 02:34
Don't Build Your Own Lisp

Don’t Build Your Own Lisp

I feel somewhat pressed to give a negative review of this book. This comes from someone who has worked on various Lisp implementations, and written some amount of C, but that isn’t an excuse to be overly harsh. This book, however, does not provide many nice things to say, and plenty of un-nice things. My apologies in advance.

First off: God help you if you are going to write your first interpreter in C of all things. No one I know thinks it’s a good idea to start

@jneen
jneen / audio.sh
Created April 16, 2020 17:58
THE ONE TRUE SETUP
#!/bin/bash
export AUDIO_DEFAULT_CAPTURE=hw:PCH
export AUDIO_DEFAULT_PLAYBACK=hw:PCH
execd() {
echo "$@" >&2
"$@"
}
Name Ownership Copyable Movable Sharing Lifetime Semantics
unique_ptr Unique Lexical Reference
shared_ptr Shared Reference Reference-counted Reference
weak_ptr Non-extending Optional-reference
value_ptr Unique Value Lexical Value
@eirikb
eirikb / clicktest.md
Last active April 9, 2021 16:49
Automated click testing in bash

About

This is a bash script, as an example, on how to do click-testing GUI based on finding components based on how they look.

Dependencies

import macros
proc procToLambda(input: PNimrodNode): PNimrodNode {.compiletime.} =
# Ident !"foo"
# Empty
# Empty
# FormalParams
# Ident retType
# IdentDefs
# ...
## Provides utility methods to make working with bit manipulations
## easier and less error prone
const
validBitfieldType = ["int", "int8", "int16", "int32", "int64", "uint",
"uint8", "uint16", "uint32", "uint64", "bool"]
macro bitfield(values: varargs[stmt]): stmt =
## Creates a bitfield with the given fields
# Validate and initial parameter processing
if values.len %% 3 != 0:
error("Each field requires three values")
/*!
* jQuery JavaScript Library v2.1.1pre
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
@swannodette
swannodette / gist:3217582
Created July 31, 2012 14:52
sudoku_compact.clj
;; based on core.logic 0.8-alpha2 or core.logic master branch
(ns sudoku
(:refer-clojure :exclude [==])
(:use clojure.core.logic))
(defn get-square [rows x y]
(for [x (range x (+ x 3))
y (range y (+ y 3))]
(get-in rows [x y])))
@kristianlm
kristianlm / Chipmunk.mk
Created May 7, 2012 15:56
Building Chipmunk for Android: An Android NDK module for Chipmunk Physics Engine
# This makefile will let the Android NDK build a
# libchipmunk.so to go with your 2D Android game.
# download the Chipmunk sources and do
# $ cd <chipmunk-physics>
# $ git checkout Chipmunk-6.0.3 # if you downloaded from source
# $ mkdir -p modules/chipmunk && cd modules/chipmunk
# $ cat >Android.mk <<EOF
LOCAL_HOME := $(dir $(lastword $(MAKEFILE_LIST)))