Skip to content

Instantly share code, notes, and snippets.

View stoeckley's full-sized avatar

andrew stoeckley

  • Balcony Studio
  • Netherlands
View GitHub Profile
@gonewest818
gonewest818 / cider-pprint-eval-to-buffer-experiments.el
Last active November 9, 2017 19:21
cider-pprint-eval-last-sexp-to-buffer
(setq lexical-binding t)
(defun cider-eval-pprint-to-multiline-comment-handler (buffer location arrow-prefix comment-prefix)
"Make a handler for evaluating and printing commented results in BUFFER.
LOCATION is the location at which to insert.
COMMENT-PREFIX is the comment prefix to use."
(cl-flet ((multiline-comment-handler (buffer value)
(with-current-buffer buffer
(save-excursion
@pesterhazy
pesterhazy / cljs-let-shadowing.md
Last active May 25, 2022 02:00
Clojurescript let global variable shadowing

Consider this ClojureScript code:

(defn foo []
  (let [location 12345] (prn js/location.hash)))

This won't work. js/ isn't a real namespace. This code will throw an exception at runtime.

The reason is that the code expands to this JS snippet:

@widdowquinn
widdowquinn / emacs_python_ide.md
Last active May 13, 2025 17:53
Turning Emacs into a Python IDE

Turning emacs into a Python IDE

## Create a new config/initialisation file

Create a user-level initialisation file init.el:

touch .emacs.d/init.el
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@Leandros
Leandros / random.h
Created July 2, 2018 05:22
C++ Pseudo Random Number Generators
/* Copyright (c) 2018 Arvid Gerstmann. */
/* This code is licensed under MIT license. */
#ifndef AG_RANDOM_H
#define AG_RANDOM_H
class splitmix
{
public:
using result_type = uint32_t;
static constexpr result_type (min)() { return 0; }
@JoshuaSullivan
JoshuaSullivan / core-image-filters-ios-13.md
Last active March 19, 2024 15:17
An enumeration of iOS 13 Core Image filters.

Core Image Filters

iOS 13 has 218 filters.

New Filters in iOS 13

  • CIDocumentEnhancer
  • CIGaborGradients
  • CIKeystoneCorrectionCombined
  • CIKeystoneCorrectionHorizontal
  • CIKeystoneCorrectionVertical