This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env tclsh | |
package require Tk | |
pack \ | |
[button .send -text Send -command {puts [lindex $pIn 1] $inData}] \ | |
[entry .b -textvariable inData] \ | |
[text .a] | |
set pIn [chan pipe] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://stackoverflow.com/questions/50166215/how-to-modify-a-state-monad | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
module SoTrans where | |
import Control.Concurrent.MVar | |
import Control.Monad |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name BitbucketServer_FirstParentsOnly | |
// @namespace http://max630.net | |
// @include https://example.com/projects/FOO/repos/BAR/commits* | |
// @version 1 | |
// @grant none | |
// @run-at document-idle | |
// ==/UserScript== | |
function HandleContent() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> {-# LANGUAGE TupleSections #-} | |
> import Control.Applicative | |
> import Data.List (isPrefixOf) | |
> import Options.Applicative | |
> prefixReader expect = eitherReader $ prefixReader' expect | |
> prefixReader' expect s = if expect `isPrefixOf` s | |
> then Right s | |
> else Left ("not(\"" ++ s ++ "\" `isPrefixOf` \"" ++ expect ++ "\")") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeFamilies #-} | |
module T1 where | |
import qualified Graphics.Win32.Misc as WM | |
import qualified System.Win32.Types as WT | |
import qualified System.Win32.File as WF | |
import Data.Int | |
import Data.Word | |
import Foreign.Ptr(Ptr()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
mkdir -p /tmp/pr3436/sub_origin | |
cd /tmp/pr3436/sub_origin | |
git init /tmp/pr3436/sub_origin | |
mkdir subdir | |
seq 1 10 >subdir/f | |
git add subdir/f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleContexts, TemplateHaskell, TupleSections #-} | |
module InlineDoBind where | |
import Data.Data (Data, gmapM) | |
import Data.Generics.Aliases (extM) | |
import Language.Haskell.TH (Exp(DoE,AppE,VarE,InfixE),Stmt(BindS),Pat(VarP)) | |
import Language.Haskell.TH.Syntax (Quasi,qNewName) | |
import Control.Monad.Trans.Writer.Strict (runWriterT,WriterT) | |
import Control.Monad.Trans.Class (lift) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module MonadStateIO (evalStateT,execStateT) where | |
import Data.Tuple (swap) | |
import qualified Control.Applicative as App | |
import qualified Control.Monad.Catch as MC | |
import qualified Control.Monad.Trans as MT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE ExplicitNamespaces #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE OverlappingInstances #-} | |
{-# LANGUAGE UndecidableInstances #-} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URxvt.perl-lib: /home/max/configs/rxvt | |
URxvt.perl-ext-common: default,keyboard-selection,selection-popup | |
URxvt.keysym.C-Tab: perl:keyboard-select:activate | |
URxvt.keysym.M-v: perl:keyboard-select:activate | |
URxvt.utmpInhibit: false |
NewerOlder