Skip to content

Instantly share code, notes, and snippets.

@hellocatfood
hellocatfood / feedback_loops.pd
Created April 2, 2014 14:05
Feedback loops in Pure Data. Now with masking!
#N canvas 1295 426 450 300 10;
#N canvas 957 82 929 997 feedback 0;
#X obj 360 250 cnv 15 220 180 empty empty empty 20 12 0 14 -228856
-262144 0;
#X obj 67 647 rotateXYZ;
#X obj 67 567 translateXYZ;
#X obj 364 275 grid grid1 100 0 10 100 0 10 0 0.1 0.1 10 10 236 82
;
#N canvas 65 118 450 300 translated 0;
#X obj 119 196 line;
@dvliman
dvliman / gist:10402435
Created April 10, 2014 17:02
ruby $ global variable
$: (Dollar Colon) is basically a shorthand version of $LOAD_PATH. $: contains an array of paths that your script will search through when using require.
$0 (Dollar Zero) contains the name of the ruby program being run. This is typically the script name.
$* (Dollar Splat) is basically shorthand for ARGV. $* contains the command line arguments that were passed to the script.
$? (Dollar Question Mark) returns the exit status of the last child process to finish.
$$ (Dollar Dollar) returns the process number of the program currently being ran.
$~ (Dollar Tilde) contains the MatchData from the previous successful pattern match.
$1, $2, $3, $4 etc represent the content of the previous successful pattern match.
$& (Dollar Ampersand) contains the matched string from the previous successful pattern match.
$+ (Dollar Plus) contains the last match from the previous successful pattern match.
$` (Dollar Backtick) contains the string before the actual matched string of the previous successful pattern match.
@SuperDoxin
SuperDoxin / logo.py
Last active November 25, 2022 22:57
Python Logo using bezier curves and the turtle module
import turtle
import math
def lerp(a, b, t):
"""Linear interpolation function. returns a when t==0, returns b when t==1
and linearly interpolates for values inbetween"""
return (a * (1 - t)) + (b * t)
@pkoppstein
pkoppstein / combine.jq
Last active August 5, 2021 02:13
a commutative and associative operator for combining two JSON objects
# This gist defines a jq filter for combining two JSON objects by resolving conflicts
# in a way that is appropriate for mapping relational tables to objects.
# "combine" as defined here is both commutative and associative.
# Example:
# { "id": 123, "son": "Son1", "surname": "S"}
# | combine({ "id": 123, "son": "Son2", "surname": "S"})
# produces: { "id": 123, "son": ["Son1",Son2], "surname": "S"}
# Combine two entities in an array-oriented fashion.
@rdebath
rdebath / README
Last active August 20, 2026 09:12
Original brainfuck distribution by Urban Müller
This archive contains the following programs:
bfc The compiler for the 'brainfuck' language (240 bytes!)
bfc.asm Source for the compiler
bfi The interpreter for the 'brainfuck' language
bfi.c Source for the interpreter (portable)
src/ Some example programs in 'brainfuck'
src/atoi.b Reads a number from stdin
src/div10.b Divides the number under the pointer by 10
src/hello.b The ubiquitous "Hello World!"
@roachhd
roachhd / README.md
Last active October 1, 2026 17:45
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@gubatron
gubatron / compiling_building_c_cpp_notes.md
Last active July 18, 2026 10:56
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015;

Last update on December 14, 2023

Updated on February 27, 2023

Updated August 29, 2019.

@klmr
klmr / gun-deaths.rmd
Last active May 5, 2022 11:19
Gun ownership vs gun deaths reanalysis
---
author: "<a href=\"http://twitter.com/klmr\">@klmr</a>"
title: "Gun deaths and gun ownership in the USA"
date: 2015-06-19
output:
html_document:
theme: readable
---
```{r echo=FALSE}
library(dplyr, warn.conflicts = FALSE, quietly = TRUE)
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active September 18, 2026 09:06
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@mindplay-dk
mindplay-dk / session-life-cycle.md
Last active July 28, 2026 12:23
Complete overview of the PHP SessionHandler life-cycle

This page provides a full overview of PHP's SessionHandler life-cycle - this was generated by a set of test-scripts, in order to provide an exact overview of when and what you can expect will be called in your custom SessionHandler implementation.

Each example is a separate script being run by a client with cookies enabled.

To the left, you can see the function being called in your script, and to the right, you can see the resulting calls being made to a custom session-handler registed using session_set_save_handler().