Skip to content

Instantly share code, notes, and snippets.

View viters's full-sized avatar
🖖

Łukasz Szcześniak viters

🖖
View GitHub Profile
@viters
viters / README.md
Last active December 10, 2019 19:19
Read package version from yarn.lock

read-yarn-lock

Example:

> npx -q https://gist.github.com/viters/e31bbe6c842f178e6955cae1211e8953 yarn.lock prettier
[email protected]

May be used in scripts such as:

@viters
viters / testing.hs
Created May 14, 2017 20:50
A simple way to test code in haskell
tests = [
(TestCondition :: Bool, "TestDescription" :: String)
]
main :: IO()
main =
mapM_ (putStrLn . snd) (filter (\(x,_) -> x == False) tests)
@viters
viters / hover-bold.css
Created August 29, 2016 13:22
Reserve space for bold on hover (not pushing elements to right)
a::after {
display:block;
content:attr(title);
font-weight:bold;
height:1px;
color:transparent;
overflow:hidden;
visibility:hidden;
margin-bottom:-1px;
}
body { margin: 30px; }
/* Add some margin to the body to add space and
see where your offending elements cross the line */
body * { border: 1px solid red; }
/* add a border to all other elements on the page */