Instantly share code, notes, and snippets.

View ghc-mod-v-check
function! ghcmod#util#ghc_mod_version() "{{{
if !exists('s:ghc_mod_version')
let l:ghcmod_version_info = vimproc#system(['ghc-mod', 'version'])
let l:m = matchlist(l:ghcmod_version_info, 'version \(\d\+\)\.\(\d\+\)\.\(\d\+\)\.\(\d\+\)')
if !len(l:m)
" That didn't work. Try "ghc-mod" alone.
let l:ghcmod_version_info = vimproc#system(['ghc-mod'])
if empty(l:ghcmod_version_info)
let l:ghcmod_version_info = vimproc#get_last_errmsg()
endif
View gist:7e42cd9fa0a4bbc8c96e
FUNCTION neocomplete#custom#get()
Called 10 times
Total time: 0.000557
Self time: 0.000557
count total (s) self (s)
10 0.000146 if !exists('s:custom')
1 0.000013 let s:custom = {}
1 0.000015 let s:custom.sources = {}
1 0.000014 let s:custom.sources._ = {}
View main.cpp
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
* File Name : main.cpp
*
* Purpose :
*
* Creation Date : 09-06-2014
* Last Modified : Mon Jun 16, 2014 10:16:31 AM
* Created By : Tim Seyschab
_._._._._._._._._._._._._._._._._._._._._.*/
View gist:db1c12faa3a27cd664a0
MemTotal: 7525060 kB
MemFree: 1677752 kB
MemAvailable: 6090812 kB
Buffers: 40 kB
Cached: 4686952 kB
SwapCached: 28 kB
Active: 2894832 kB
Inactive: 2547492 kB
Active(anon): 738700 kB
Inactive(anon): 183216 kB
View gist:d1486f3e85deeb168962
processor : 0
vendor_id : AuthenticAMD
cpu family : 22
model : 0
model name : AMD A4-5000 APU with Radeon(TM) HD Graphics
stepping : 1
microcode : 0x7000106
cpu MHz : 800.000
cache size : 2048 KB
physical id : 0
View histogram.hs
import Data.Word
import Data.Array.Repa.IO.DevIL as RD
import qualified Data.Array.Repa as R
import qualified Data.Array.Repa.Unsafe as RU
import Data.Array.Repa ((:.), Array, (:.)(..), Z(..), DIM3)
import Data.Array.Repa.Repr.ForeignPtr (F)
type Histogram = R.Array R.D R.DIM2 Int
calcHisto :: Array F DIM3 Word8 -> Histogram