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
| ;; Enable editable dired mode. | |
| (add-hook 'dired-mode-hook | |
| (lambda () | |
| (define-key dired-mode-map | |
| "r" 'wdired-change-to-wdired-mode) | |
| (setq truncate-lines t))) | |
| ;; Enable a in dired mode to view a file w/o creating a new buffer. | |
| (put 'dired-find-alternate-file 'disabled nil) | |
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
| # create new page (or adjust existing page) called 'test' | |
| $ curl https://api.silkapp.com/v1.4.0/site/uri/yoursite.silkapp.com/page/test | |
| -d '<article>...</article>' | |
| -b 'silk_sid=...' | |
| -X PUT | |
| -H 'Content-Type: application/xml' |
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
| <!-- page structure showing the title (line 7) and subtitle (line 8) --> | |
| <article> | |
| <section class="body"> | |
| <div class="layout meta"> <!-- left column --> | |
| <div class="block header text" data-component-uri="http://silkapp.com/component/block/text"> | |
| <h1>Title</h1> | |
| <p>Subtitle</p> | |
| </div> | |
| </div> |
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
| (defun delete-trailing-whitespace-and-extra-nl () | |
| (interactive) | |
| (let ((two? (ends-with-two-linebreaks?))) | |
| (progn | |
| (delete-trailing-whitespace) | |
| (if (and two? (string-match "silk" (buffer-file-name))) | |
| (save-excursion | |
| (let ((undo-list (undo-copy-list buffer-undo-list))) | |
| (progn | |
| (buffer-disable-undo) |
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 EmptyDataDecls, FlexibleContexts, GADTs, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies #-} | |
| module A where | |
| import Database.Persist.TH | |
| share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase| | |
| A | |
| |] |
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
| module Foo | |
| ( module Control.Applicative | |
| , g | |
| ) where | |
| import Control.Applicative | |
| g :: Int | |
| g = 1 |
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 | |
| EmptyDataDecls | |
| , FlexibleContexts | |
| , GADTs | |
| , OverloadedStrings | |
| , QuasiQuotes | |
| , TemplateHaskell | |
| , TypeFamilies | |
| #-} | |
| module Bar where |
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 RankNTypes #-} | |
| module Test where | |
| import Data.Data (Data) | |
| import Data.Generics.Uniplate.Data | |
| import Data.Typeable (Typeable) | |
| import Language.Haskell.Exts.Annotated hiding (binds, loc) | |
| import Prelude hiding (exp) |
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 | |
| , FlexibleInstances | |
| , MultiParamTypeClasses | |
| , TypeSynonymInstances | |
| #-} | |
| module ToStringy (ToStringy (..), fromStringy) where | |
| import Data.String | |
| import qualified Data.ByteString as SB |
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 RankNTypes, TypeFamilies, ConstraintKinds #-} | |
| import Data.String | |
| import Data.String.ToString | |
| import Text.XML.HXT.Arrow.Pickle | |
| import GHC.Exts | |
| import qualified Data.Map.Strict as SM | |
| f :: (C map key, C map String, XmlPickler (map String value), IsString key, ToString key) | |
| => (forall k k'. C map k => (k -> k') -> map k value -> map k' value) |