This file contains 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
{ | |
"main": "app/index.html", | |
"scripts": { | |
"webpack": "node_modules/.bin/webpack", | |
"webpack-dev-server": "node_modules/.bin/webpack-dev-server", | |
"clean": "rm -rf ./app/", | |
"bundle": "env NODE_ENV=development webpack --progress --colors", | |
"bundleprod": "env NODE_ENV=production webpack --progress --colors", | |
"devserver": "npm run clean && env NODE_ENV=development webpack-dev-server --progress --colors --inline --open --host localhost --port 8000 --watch", | |
"rebuild": "npm run clean && npm run bundle", |
This file contains 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
filetype off | |
set rtp+=~/.config/nvim/bundle/Vundle.vim | |
call vundle#begin("~/.config/nvim/bundle") | |
Plugin 'VundleVim/Vundle.vim', {'pinned': 1} | |
Plugin 'airblade/vim-gitgutter' | |
call vundle#end() | |
filetype plugin indent on |
This file contains 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
function! s:PreviousTab_StoreState() | |
let s:tab_current = tabpagenr() | |
let s:tab_last = tabpagenr('$') | |
endfunction | |
function! s:PreviousTab_TabClosed() | |
if s:tab_current > 1 && s:tab_current < s:tab_last | |
exec 'tabp' | |
endif | |
endfunction | |
autocmd TabEnter,TabLeave * call s:PreviousTab_StoreState() |
This file contains 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 Main where | |
import System.Random (newStdGen, randomRs) | |
someFunc salts x = | |
map mapper $ take 20 salts | |
where mapper = (+ x) . floor . (* 10) | |
main :: IO () | |
main = do |
This file contains 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/bash | |
# reset devices outputs volumes | |
pactl list sinks short | awk '{print $2}' | xargs -I {} pactl set-sink-volume '{}' 0db | |
# reset devices inputs volumes | |
pactl list sources short | awk '{print $2}' | xargs -I {} pactl set-source-volume '{}' 0db | |
# reset applications outputs volumes | |
pactl list sink-inputs short | awk '{print $1}' | xargs -I {} pactl set-sink-input-volume '{}' 0db | |
# reset applications inputs volumes |
This file contains 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 stack | |
-- stack runghc --resolver lts-7.7 --install-ghc --package data-default-0.7.1.1 --package interpolatedstring-perl6-1.0.0 --package transformers-0.5.2.0 --package either-4.4.1.1 | |
{-# LANGUAGE QuasiQuotes #-} | |
{-# LANGUAGE PackageImports #-} | |
import "base" Data.Either (Either(Left, Right), either) | |
import "interpolatedstring-perl6" Text.InterpolatedString.Perl6 (qc) | |
import "data-default" Data.Default (Default, def) |
This file contains 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 stack | |
-- stack runghc --resolver lts-7.7 --install-ghc --package interpolatedstring-perl6 --package transformers --package either --package mtl --package lens | |
{-# LANGUAGE QuasiQuotes #-} | |
{-# LANGUAGE PackageImports #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeFamilies #-} |
This file contains 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 stack | |
-- stack runghc --resolver lts-7.7 --install-ghc --package lens | |
{-# LANGUAGE PackageImports #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE RankNTypes #-} | |
-- that's what I was looking for, | |
-- thanks to 'shachaf' from #haskell-lens on Freenode IRC. | |
{-# LANGUAGE NoMonomorphismRestriction #-} |
This file contains 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/bash | |
exec 0<&- | |
displays=$( | |
xrandr --current \ | |
| grep -oP '(?! )(\d+)x(\d+)\+(\d+)\+(\d+)' \ | |
| sed 's/[x+]/ /g' | |
) | |
[ $? -ne 0 ] && { echo 'Error while getting displays info' 1>&2; exit 1; } |
OlderNewer