Skip to content

Instantly share code, notes, and snippets.

View greghendershott's full-sized avatar

Greg Hendershott greghendershott

View GitHub Profile
$ sudo yum update
$ sudo yum install openssl-devel
$ sudo yum install gcc-c++
$ wget -c http://znc.in/releases/znc-latest.tar.gz
$ tar -xzvf znc-latest.tar.gz
$ cd znc*
$ ./configure
$ make
$ sudo make install
@takikawa
takikawa / gist:3723651
Created September 14, 2012 18:13
define/match
#lang racket
;; added something like `where` clauses
(require (for-syntax syntax/parse
syntax/parse/experimental/template))
(provide define/match)
(begin-for-syntax
@areina
areina / emacs-email-setup.md
Created October 12, 2012 15:00
Manage your email in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
@greghendershott
greghendershott / gist:4233480
Created December 7, 2012 14:09
A gist to check if Github has deployed the Racket lexer

Before Github deploys the Racket lexer from pygments-main via pygments.rb, the following will appear as plain, black monospace. After they deploy, this will appear color-coded:

(let ([x 0])
  x)

Then it will look similar to the Scheme lexer (below) but, as the most glaring example, brackets will not be colored as errors:

@greghendershott
greghendershott / git-workflow.md
Last active September 30, 2016 14:56
Draft of guide for new and/or casual contributors to Racket. Again, this is a DRAFT. Please be careful using. If you spot any mistakes, please let me know.

A guide for new and/or casual contributors to Racket

Maybe you're comfortable with Git, but haven't made a pull request before.

Maybe you've made one-off pull requests, but haven't tried to contribute to the same project over time and stay in sync with the upstream project.

This guide may help. DRAFT

@tonyg
tonyg / README.md
Created January 16, 2013 17:09
Racket custodians and namespaces for rebootable racket programs

Demonstrates the use of Racket's custodians and namespaces to create enough isolation to "reboot" programs without restarting the whole of Racket, including possibly recompiling and reloading code.

To experiment with this:

$ racket ~/src/racket-experiments$ racket
Welcome to Racket v5.3.1.4.
-> (require "reloader.rkt")
-> (load-and-foo)
Starting worker...

test-mod: "foo"

@dyoo
dyoo / gist:4659253
Created January 28, 2013 21:33
external test with submodule
#lang racket
(define (f x)
(* x x))
(provide f)
(module* foo racket/base
;; External test of the function
(require rackunit
@dyoo
dyoo / annotation-example.rkt
Last active December 15, 2015 19:49
An example of using namespaces and modules to communicate between annotated, expanded syntax, and some external evaluator. We do it without 3d syntax, which avoids the sort of silly problems that can happen otherwise. (e.g. we can actually compile the code.)
#lang racket
;; Experiment: interaction between compiled code and a tool.
;;
;; Typically, 3d syntax is often used here. But let's say we don't
;; want 3d syntax. Is there another way?
;;
;; Idea: when evaluating code, attach a module to the evaluating
;; namespace that the code and the tool share.
;;
@soegaard
soegaard / colors.rkt
Created August 8, 2013 18:09
Match expanders and color% objects
#lang racket
(require racket/draw (for-syntax syntax/parse) pict unstable/gui/pict)
(define-syntax defv (make-rename-transformer #'define-values))
(define-syntax defm (make-rename-transformer #'match-define))
(define-syntax def (make-rename-transformer #'define))
(define-match-expander color:
(λ (stx)
(syntax-parse stx
@khernyo
khernyo / racket-android-build.sh
Last active March 20, 2016 09:20
Make it build the android version properly
#!/bin/bash
set -e
SCRIPT_DIR=$( cd "$( dirname "$0" )" && pwd )
# the location of a clean racket repo which will be copied to avoid "git clone"-ing
REPO=$SCRIPT_DIR/../tools/racket
PLATFORM=linux-x86_64