Skip to content

Instantly share code, notes, and snippets.

View ijames's full-sized avatar

James Bennett Saxon ijames

View GitHub Profile
@ijames
ijames / wordy.hs
Last active May 5, 2023 03:00
Exercism Haskell doesn't like the Text.Regex.Posix lib, but this passes the wordy tests!
{-# OPTIONS_GHC -Wno-overlapping-patterns #-}
module WordProblem ( answer ) where
-- From the Exercism exercise: https://exercism.org/tracks/haskell/exercises/wordy
-- Trying to do this:
-- * in a non parsing,
-- * with a narrow domain thinking (x `op` y only)
-- import Text.Regex.Posix Cost me a couple hours!!!
-- I didn't try Text.Regex.PCRE.Heavy (pcre-heavy in the package.yaml) but I guess that would have worked.
@ijames
ijames / mini_cli_nav_cheatsheet
Created April 3, 2019 20:19
Mini CLI (emacs) Navigation Shortcut Cheatsheet for Stickies
CLI SHORTCUTS
PASTE
-> ......... C-y
Prev WORD .. M-.
JUMP <-> <- ... C-xx
WORD
SWAP <- ... M-t
@ijames
ijames / mini_tmux_cheatsheet
Created April 3, 2019 20:17
Mini tmux Shortcut Cheatsheet For Stickies
TMUX SHORTCUTS
(First type prefix key)
PANES
Kill .................... x
SPLIT
top/bottom .......... "
side/side ........... %
GO
◊<> ................. arrow
@ijames
ijames / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<polymer-element name="schedule-item">
<template>
<style>
:host {
display: block;
position: relative;
padding: 12px 6px;
@ijames
ijames / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="sir-calls-a-lot">
<template>
<style>
// There's got to be a better browser size scheme than this
// 14 Aug 2009
window.size = function() {
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {