Skip to content

Instantly share code, notes, and snippets.

View johnjcamilleri's full-sized avatar

John J. Camilleri johnjcamilleri

View GitHub Profile
@johnjcamilleri
johnjcamilleri / redo-error
Created March 15, 2013 10:50
Debugging information when trying to load redo+.el on GNU Emacs 24 on OSX
Debugger entered--Lisp error: (error "Attempt to modify read-only object")
setcar(((and (not buffer-read-only) (not (eq t buffer-undo-list)) (if (eq last-command (quote undo)) (listp pending-undo-list) (consp buffer-undo-list))) :help "Undo last operation") (and (not buffer-read-only) (consp buffer-undo-list) (or (not (or (eq last-buffer-undo-list buffer-undo-list) (eq last-buffer-undo-list (cdr buffer-undo-list)))) (listp pending-undo-list))))
(lambda (map) (setcar (cdr (memq :enable (assq (quote undo) (cdr map)))) (quote (and (not buffer-read-only) (consp buffer-undo-list) (or (not (or (eq last-buffer-undo-list buffer-undo-list) (eq last-buffer-undo-list ...))) (listp pending-undo-list))))))((keymap (undo menu-item "Undo" undo :enable (and (not buffer-read-only) (not (eq t buffer-undo-list)) (if (eq last-command (quote undo)) (listp pending-undo-list) (consp buffer-undo-list))) :help "Undo last operation") (separator-undo "--") (cut menu-item "Cut" kill-region :enable (and mark-active (not buffer-read-o
-- General
foldl :: (a -> b -> a) -> a -> [b] -> a
foldr :: (a -> b -> b) -> b -> [a] -> b
curry :: ((a, b) -> c) -> a -> b -> c
uncurry :: (a -> b -> c) -> ((a, b) -> c)
(.) :: (b -> c) -> (a -> b) -> (a -> c)
-- Monoids
class Monoid a where
mempty :: a
@johnjcamilleri
johnjcamilleri / gist:5962219
Created July 9, 2013 23:27
yum install errors
# yum install php-devel
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
epel/metalink | 18 kB 00:00
epel-debuginfo/metalink | 18 kB 00:00
epel-source/metalink | 18 kB 00:00
* epel: mirror.nl.leaseweb.net
* epel-debuginfo: mirror.nl.leaseweb.net
* epel-source: mirror.nl.leaseweb.net
* remi: rpms.famillecollet.com
abstract Camel = {
cat
Kind ;
Action Kind;
Component Kind;
S;
fun
@johnjcamilleri
johnjcamilleri / ghc-pkg describe directory
Last active August 29, 2015 13:59
GHC duplicate definition problem
name: directory
version: 1.2.1.0
id: directory-1.2.1.0-7a09c89a907b17a89f075cae951c808c
license: BSD3
copyright:
maintainer: libraries@haskell.org
stability:
homepage:
package-url:
synopsis: library for directory handling
@johnjcamilleri
johnjcamilleri / shell-log
Created June 27, 2014 12:13
Bug with --optimize-pgf
john@Biskuttina:~/repositories/REMU/projects/contract-logic/cnl$ ll
total 28056
drwxr-xr-x 23 john staff 782B Jun 27 14:04 ./
drwxr-xr-x 61 john staff 2.0K Jun 27 11:09 ../
-rw-r--r--@ 1 john staff 6.0K Apr 14 14:08 .DS_Store
-rw-r--r-- 1 john staff 80B May 5 13:06 CODiagFull.gf
-rw-r--r-- 1 john staff 145B Jun 27 14:03 CODiagFull.gfo
-rw-r--r-- 1 john staff 69B May 5 13:06 CODiagFullEng.gf
-rw-r--r-- 1 john staff 157B Jun 27 14:03 CODiagFullEng.gfo
-rw-r--r-- 1 john staff 226B May 5 13:29 CODiagFullEngParse.gf
> quickCheck (property True)
+++ OK, passed 100 tests.
> quickCheck (property False)
*** Failed! Falsifiable (after 1 test):
> quickCheck (unsafePerformIO $ return $ property True)
+++ OK, passed 100 tests.
> quickCheck (unsafePerformIO $ return $ property False)
*** Failed! Falsifiable (after 1 test):
@johnjcamilleri
johnjcamilleri / bard.json
Last active August 29, 2015 14:25
Examples of the data structure for the Minsel Etymological Dictionary
{
"lemma" : "bard",
"pos" : "NOUN",
"gender" : "m",
"senses" : [
{
"sense_id" : 1,
"description" : [
"cold, coldness, coolness, chilliness, freezing cold"
],
@johnjcamilleri
johnjcamilleri / activate-hs
Created November 10, 2015 13:38
activate-hs
#!/bin/sh
quiet=no
verbose=no
dryrun=no
list=no
version="" # forgiving user input version
hpVersion="" # like "2014.2.0.0"
This is now a view method. Call TextEditorElement::getHeight instead.
TextEditor.getHeight - <embedded>:5679:18
Object.toggle - /Users/john/.atom/packages/center-line/lib/center-line.coffee:44:25
atom-text-editor.atom.commands.add.center-line:toggle - /Users/john/.atom/packages/center-line/lib/center-line.coffee:11:26
CommandRegistry.handleCommandEvent - <embedded>:18901:35
<unknown> - <embedded>:18639:65
KeymapManager.dispatchCommandEvent - <embedded>:66514:22
This is now a view method. Call TextEditorElement::getHeight instead.
TextEditor.getHeight - <embedded>:5679:18