Skip to content

Instantly share code, notes, and snippets.

View Teggy's full-sized avatar
💯
100% busy shooting lecture videos...

Torsten Grust Teggy

💯
100% busy shooting lecture videos...
View GitHub Profile
SELECT COUNT(*)
FROM R
WHERE NOT EXISTS (SELECT 1
FROM S
WHERE S.A = R.A)
@Teggy
Teggy / flat_query.sql
Created July 25, 2008 08:24
Flat vs. nested SQL queries (just a gist test)
select max(A)
from R
where R.B in (1,2,3,4,5,6,7,8,9,10)
@Teggy
Teggy / init.js
Created August 10, 2012 14:26
Chocolat mixin: Replace selection with current date (example code that captures the output of a spawned process)
/*!
* Replace selection with current date
* Copyright(c) 2012 Torsten Grust <torsten.grust@gmail.com>
*/
var spawn = require('child_process').spawn;
/**
* Hook up menu items.
*/
@Teggy
Teggy / Chocolat-1.3.2-crash-report
Created October 9, 2012 09:45
Chocolat 1.3.2 Crash Report. These happen frequently (a dozen times) a day and turn out to be a real show-stopper.
Process: Chocolat [21406]
Path: /Applications/Chocolat.app/Contents/MacOS/Chocolat
Identifier: com.chocolatapp.Chocolat
Version: 1.3.2 (1.3.2)
Code Type: X86-64 (Native)
Parent Process: launchd [154]
User ID: 501
Date/Time: 2012-10-09 11:42:33.565 +0200
OS Version: Mac OS X 10.8.2 (12C60)
@Teggy
Teggy / init.js
Created October 9, 2012 11:17
Live LaTeX previewing with Chocolat and Skim.app
/*!
* Experimental Chocolat mixins
* Copyright(c) 2012 Torsten Grust <torsten.grust@gmail.com>
*/
var fs = require('fs');
var path = require('path');
var spawn = require('child_process').spawn;
var flashLaTeX = require('./tex.js').flashLaTeX;

Keybase proof

I hereby claim:

  • I am Teggy on github.
  • I am teggy (https://keybase.io/teggy) on keybase.
  • I have a public key whose fingerprint is A3B0 BC48 CA26 C3C1 0666 2837 E60A A49E 46AF 1FDF

To claim this, I am signing this object:

@Teggy
Teggy / four-solutions-to-a-trivial-problem.hs
Last active September 23, 2022 21:44
A Haskell "transcript" of Guy Steele's talk "Four Solutions to a Trivial Problem" (https://www.youtube.com/watch?v=ftcIcn8AmSY)
{-# LANGUAGE TypeSynonymInstances #-}
import Data.Monoid
import Data.Maybe
-- How much water does a "histogram" hold?
--
-- Inspired by Guy Steele's talk "Four Solutions to a Trivial Problem"
-- https://www.youtube.com/watch?v=ftcIcn8AmSY
@Teggy
Teggy / regression.md.html
Created May 12, 2017 14:58
SVG regression in Markdeep v0.19?
************
* o *
* / *
* / *
* o *
************
@Teggy
Teggy / diagram-vs-Unicode.md.html
Created May 23, 2017 14:22
Unicode characters beyond the BMP confuse Markdeep's diagrams
The bold capital Sigma (U+1D6BA) in the diagram below will not
be rendered. Since it occupies two indices in the extracted
diagram string, grid width computation is off by one (see the
spurious `*` rendered in the resulting document):
*******
* x𝚺x *
* xxx *
*******
-- Tupper's self-referential formula
--
-- Plot points x ∈ [0,106), y ∈ [k, k+17) for which
-- ½ < ⌊mod(⌊y/17⌋ × 2^(-17 × ⌊x⌋ - mod(⌊y⌋, 17), 2)⌋
-- holds.
--
-- The plotted image contains a representation of the formula itself:
--
-- █ █ █ ██ █ █ █ █ █ █ █ ██ █ █ █
-- █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █