Skip to content

Instantly share code, notes, and snippets.

View chadluo's full-sized avatar
🟢
pls gib green

Chad Luo chadluo

🟢
pls gib green
  • Sydney
  • 19:24 (UTC +10:00)
View GitHub Profile
@nepsilon
nepsilon / 3-python-module-you-can-use-on-cli.md
Last active February 19, 2017 13:35
3 Python modules you can use directly in the CLI — First published in fullweb.io issue #45

3 Python modules you can use directly on the CLI

1. Start a local webserver to serve the file of your current directory on the LAN:

# Python version 2.x:
python -m SimpleHTTPServer 
# Python version 3.x:
python3 -m http.server
module PyramidSlideDown where
-- import Data.Foldable as F
import Control.Arrow
longestSlideDown :: [[Int]] -> Int
longestSlideDown = foldl1 combine >>> maximum
where
xs `combine` ys = head ls : zipWith max (tail ls) (init rs) ++ [last rs]
where
@TerrorJack
TerrorJack / gist:f1c5e26dab474927c756
Last active August 29, 2015 14:23
Haskell blogs worth reading

Haskell blogs worth reading

This is a (hopefully) short list of Haskell blogs I consider worth reading for intermediate Haskellers.

A Quick and Dirty Lens primer

Why does Lens exist? Well, Haskell records suck, for a number of reasons. I will enumerate them using this sample record.

data User = User { login    :: Text
                 , password :: ByteString
                 , email    :: Text
                 , created  :: UTCTime
 }
@paf31
paf31 / 24days.md
Last active August 8, 2023 05:53
24 Days of PureScript

This blog post series has moved here.

You might also be interested in the 2016 version.

@addyosmani
addyosmani / package.json
Last active May 29, 2024 15:54
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@pchiusano
pchiusano / type-inhabitants.markdown
Last active January 7, 2023 17:23
Reasoning about type inhabitants in Haskell

This is material to go along with a 2014 Boston Haskell talk.

We are going to look at a series of type signatures in Haskell and explore how parametricity (or lack thereof) lets us constrain what a function is allowed to do.

Let's start with a decidedly non-generic function signature. What are the possible implementations of this function which typecheck?

wrangle :: Int -> Int
@zhasm
zhasm / new_mac.md
Last active December 9, 2016 00:46
New Mac Configration
@yisibl
yisibl / HTML-tags.md
Last active September 15, 2024 14:09
常用的 HTML 头部标签

常用的 HTML 头部标签

详细介绍参见原文:yisibl/blog#1

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
    <meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->