Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<!-- This is just a very slightly modified tracking.js demo: https://trackingjs.com/examples/face_camera.html -->
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/tracking.js/1.1.3/tracking-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tracking.js/1.1.3/data/face-min.js"></script>
<style>
video, canvas {
margin-left: 100px;
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE UnicodeSyntax #-}
import Shake.It.Off
import Control.Monad (when)
#if !( defined(mingw32_HOST_OS) || defined(__MINGW32__) )
import System.Posix.User
@dvanhorn
dvanhorn / tweet.rkt
Last active May 10, 2021 13:18
Tweet from Racket
#lang racket
(provide tweet! (struct-out oauth) current-oauth)
(require (only-in racket/random crypto-random-bytes)
json
net/url
(only-in net/uri-codec [uri-unreserved-encode %])
web-server/stuffers/hmac-sha1
(only-in net/base64 base64-encode))
;; tweet! : String -> JSON
@tpruzina
tpruzina / gist:c4d9c0ca6bdbb6e78ab2126a7cdf8f1c
Last active May 10, 2017 08:09
NVIDIA-378.13-KERNEL-4.10.patch
diff -ur NVIDIA-Linux-x86_64-378.13/kernel/common/inc/nv-mm.h NVIDIA-Linux-x86_64-378.13.patched/kernel/common/inc/nv-mm.h
--- NVIDIA-Linux-x86_64-378.13/kernel/common/inc/nv-mm.h 2017-02-08 04:58:34.000000000 +0100
+++ NVIDIA-Linux-x86_64-378.13.patched/kernel/common/inc/nv-mm.h 2017-02-23 18:57:34.655592444 +0100
@@ -46,6 +46,8 @@
* 2016 Dec 14:5b56d49fc31dbb0487e14ead790fc81ca9fb2c99
*/
+#include <linux/version.h>
+
#if defined(NV_GET_USER_PAGES_REMOTE_PRESENT)
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active June 17, 2024 15:05
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@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
@qnikst
qnikst / get.hs
Last active January 12, 2016 07:03 — forked from ndtimofeev/get.hs
-- stylistic
{-# LANGUAGE LambdaCase #-}
-- singletons
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE GADTs #-}
-- main
{-# LANGUAGE DataKinds #-} -- typelevel programming
{-# LANGUAGE TypeFamilies #-} -- typelevel programming
{-# LANGUAGE ScopedTypeVariables #-} -- typelevel programming
@cnd
cnd / ok.md
Created October 21, 2015 12:19

-- | Raw text will not HTML escape its children.
-- Useful for writing templates.
class Raw arg result | result -> arg where
  raw :: arg    -- ^ Either an attribute list or children.
      -> result -- ^ Result: either an element or an attribute.
  raw = rawWith []
 rawWith :: [Attribute] -- ^ Attribute transformer.
{CompositeDisposable} = require 'atom'
{BufferedProcess} = require 'atom'
{dirname} = require 'path'
{statSync} = require 'fs'
prettify = (text, workingDirectory, {onComplete, onFailure}) ->
lines = []
proc = new BufferedProcess
command: 'hindent'
args: ['--style', 'chris-done']

heather [5:55 PM]

__<

lenadroid [5:55 PM] well... it displays wrong

heather [5:55 PM] yes

lenadroid [5:55 PM]