Skip to content

Instantly share code, notes, and snippets.

Avatar

Hugo hugo-dc

View GitHub Profile
@mietek
mietek / i-dont-get-functional-programming.md
Last active Aug 29, 2015
Partial transcript of “I Don’t Get Functional Programming”
View i-dont-get-functional-programming.md

10: I Don’t Get Functional Programming

The Bike Shed

Partial transcript (35:10–39:10)

Derek Prior: “How is that ecosystem? I know when we first deployed things, it wasn’t going particularly well.”

Pat Brisbin: “Although the deployment was difficult, the ecosystem’s great. There’s, like I said, thousands of libraries to do anything that you need.”

View cordova.hs
--
-- Hello-World of the cordova/phonegap application using Haskell.
--
-- here is the screenshoot
--
-- https://twitter.com/AGoCorona/status/532948528621178880
--
-- So that Haste-Haskell can be used to create hybrid smartphone applications
--
-- The original cordova JavaScript hello world is installed following the instructions of this page
View pulsar.js
return function (r, w) {
for (var i = 0; i < w.data.length; i += 4) {
w.data[i] = r.data[i]/(w.data[i]+1)*100+1;
w.data[i+1] = r.data[i+1]/(w.data[i+1]+1)*100+1;
w.data[i+2] = r.data[i+1]/(w.data[i+2]+1)*100+1;
w.data[i+3] = 255;
}
}
@staltz
staltz / introrx.md
Last active Mar 1, 2021
The introduction to Reactive Programming you've been missing
View introrx.md
@bzg
bzg / emacs-strip.el
Last active Oct 23, 2020
Emacs, naked
View emacs-strip.el
;; Prevent the cursor from blinking
(blink-cursor-mode 0)
;; Don't use messages that you don't read
(setq initial-scratch-message "")
(setq inhibit-startup-message t)
;; Don't let Emacs hurt your ears
(setq visible-bell t)
;; You need to set `inhibit-startup-echo-area-message' from the
;; customization interface:
@codedot
codedot / Makefile
Last active Dec 29, 2015
Hedging client for Ripple
View Makefile
HEDGE = node riphedge
all:
npm install ripple-lib
hedge:
$(HEDGE) | tee hedge.txt
grep -q Ask hedge.txt
mailx -s "`grep Ripples hedge.txt`" me <hedge.txt
@maxogden
maxogden / readme.md
Last active Sep 11, 2020
How-to: Write a node module with voxel.js
View readme.md

Writing node modules with voxel.js

This is a short guide that will teach you the workflows that have been figured out by the voxel.js community for writing node modules + sharing them on NPM and Github. It is assumed that you have a basic understanding of JavaScript, github and the command line (if not you can check out an introduction to git and the command line or learn JS basics from JavaScript for Cats)

The voxel-tower repository on github contains all the example code from this guide.

Table of contents

@mikehaertl
mikehaertl / gist:3258427
Created Aug 4, 2012
Learn you a Haskell - In a nutshell
View gist:3258427

Learn you a Haskell - In a nutshell

This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.


1. Introduction

  • Haskell is a functional programming language.
@dpwiz
dpwiz / scotty-auth.hs
Last active Aug 31, 2016
Check Basic HTTP Authentication in Scotty
View scotty-auth.hs
main :: IO ()
main = scotty 3000 app
app :: ScottyM ()
app = do
rcon <- liftIO $ R.connect R.defaultConnectInfo {R.connectPort = R.UnixSocket "redis.sock"}
get "/favicon.ico" $ html "ಠ_ಠ"
get "/:method" $ do
@nrrrdcore
nrrrdcore / bending-shadow.css
Last active Jan 11, 2021
Simple Bended-Shadow CSS: Create the Bended Photo Effect without writing a million divs.
View bending-shadow.css
.bended-shadow {
position: relative;
width: 500px;
margin: 200px auto;
}
.bended-shadow::before, .bended-shadow::after {
content: '';
position: absolute;
width: 60%;