Skip to content

Instantly share code, notes, and snippets.

View stoeckley's full-sized avatar

andrew stoeckley

  • Balcony Studio
  • Netherlands
View GitHub Profile
@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
@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; }
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);
@widdowquinn
widdowquinn / emacs_python_ide.md
Last active April 27, 2023 17:36
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
@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:

@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
@stuarthalloway
stuarthalloway / missing_keys_specs.clj
Created October 14, 2017 11:44
I think it would be a mistake to introduce temporal coupling to prevent typos.
;; I think it would be a mistake to introduce temporal coupling to prevent typos.
;; The example program below lets you identify "missing" keys specs at
;; the time and place of your choosing, and then handle them as you
;; deem appropriate, without imposing those decisions on other
;; users of spec.
(require '[clojure.spec.alpha :as s]
'[clojure.set :as set])
@IanRamosC
IanRamosC / DigitalClock.elm
Created September 15, 2016 14:38
A Digital Clock built with Elm 0.17
module DigitalClock exposing (clock)
import Html exposing (Html)
import Html.Attributes as HA exposing (style)
import Html.App as App
import Svg exposing (..)
import Svg.Attributes exposing (..)
import Color exposing (rgb)
import Date as D exposing (..)
@petewarden
petewarden / ..build-protobuf-3.0.0.md
Last active September 27, 2022 08:19 — forked from BennettSmith/..build-protbuf-2.5.0.md
Script used to build Google Protobuf 3.0.0 for use with Xcode 7 / iOS 9. Builds all supported architectures and produces a universal binary static library.

Google Protobuf 3.0.1 - Mac OS X and iOS Support

The script in this gist will help you buid the Google Protobuf library for use with Mac OS X and iOS. Other methods (such as homebrew or direct compilation) have issues that prevent their use. The libraries built by this script are universal and support all iOS device architectures including the simulator.

This gist was adapted from the original at https://gist.github.com/BennettSmith/7150245, and updated to deal with Xcode 7 and iOS 9, and download protobuf version 3.0.0.

@Gubarev
Gubarev / .gitignore
Last active December 2, 2021 22:10 — forked from BennettSmith/.gitignore
Google Protobuf v2.6.0 Build Script for iOS
protobuf
protobuf-2.6.0
protobuf-master