Skip to content

Instantly share code, notes, and snippets.

View gregnwosu's full-sized avatar

Gregory Nwosu gregnwosu

View GitHub Profile
@avkoval
avkoval / get_ical.py
Created January 8, 2017 10:22
Save some ICS files
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
GOOGLE_CAL_URL = 'https://calendar.google.com/calendar/ical/'
CALENDARS = {
'My': 'alex.v.koval%40gmail.com/private-somehash%%%/basic.ics'
}
@vasanthk
vasanthk / System Design.md
Last active May 16, 2024 20:21
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@merijn
merijn / Scraper.hs
Created July 9, 2015 08:20
Concurrent webscraper
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent.Async
import Control.Concurrent.QSem
import Control.Monad
import Control.Monad.Catch
import Control.Monad.Trans
import Control.Monad.Reader
import Data.ByteString.Lazy (ByteString)
@gigamonkey
gigamonkey / easy.txt
Last active September 23, 2015 05:08
My first Haskell program -- it didn't work the first time it type checked but I got it there. Simple Sudoku solver based on the search part of Peter Norvig's essay about solving every Sudoku.
. 5 . | . . 1 | 4 7 9
. . 2 | 7 . . | . . 8
. . . | . 4 6 | 2 . .
------+-------+------
. 4 6 | . . 9 | 5 3 7
. . . | . 6 . | . . .
8 9 3 | 5 . . | 6 4 .
------+-------+------
. . 9 | 6 1 . | . . .
1 . . | . . 2 | 3 . .
@egonSchiele
egonSchiele / Mario.hs
Created July 15, 2013 01:41
Lens example using Mario
{-# LANGUAGE TemplateHaskell #-}
import Control.Lens
data Point = Point {
_x :: Double,
_y :: Double
} deriving (Show)
data Mario = Mario { _location :: Point } deriving (Show)