Skip to content

Instantly share code, notes, and snippets.

View alexandre's full-sized avatar
🎯
Focusing

Alexandre Souza alexandre

🎯
Focusing
View GitHub Profile
@wcravens
wcravens / gist:0e1e423ce1823b718b9d5b1ddf6acffa
Last active March 24, 2021 13:53 — forked from mikehaertl/gist:3258427
Learn you a Haskell - In a nutshell

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.
(*
ocamlbuild \
-pkg containers \
-pkg lwt \
-pkg yojson \
-pkg conduit.lwt-unix \
-pkg nocrypto \
-pkg nocrypto.unix \
-pkg websocket.lwt \
-cflags "-w A-4-40-41-42-44" \
from concurrent.futures import as_completed, ThreadPoolExecutor
from urllib.request import urlopen
import re
import sys
DEFAULT_REGEX = r'<input type="text" id="nacional" value="([^"]+)"/>'
CURRENCY = {
'dolar': 'http://dolarhoje.com/',
'euro': 'http://eurohoje.com/',
@vasanthk
vasanthk / System Design.md
Last active June 29, 2024 19:22
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?
#define _GNU_SOURCE 1
#include <sched.h> // sched_setaffinity
#include <stdint.h>
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <stdint.h>
#include <pthread.h>
#include <assert.h>
#include <sys/time.h>
@motokiee
motokiee / CodePiece.hs
Created October 28, 2015 05:08
あまり進捗はなかった #CodePiece
module Shapes
( Point, Shape, area, nudge, baseCircle, baseRect ) where
-- 値コンストラクタが1つしかない場合、データ型と値コンストラクタは同じ名前にする(慣例)
data Point = Point Float Float deriving (Show)
data Shape = Circle Point Float | Rectangle Point Point deriving (Show)
area :: Shape -> Float
area (Circle _ r) = pi * r ^ 2
area (Rectangle (Point x1 y1) (Point x2 y2)) = (abs $ x2 - x1) * (abs $ y2 - y1)
@mnot
mnot / snowden-ietf93.md
Last active September 12, 2023 13:40
Transcript of Edward Snowden's comments at IETF93.
@cuducos
cuducos / bootstrap.sh
Last active August 9, 2019 02:07
Computer Bootstraps
#!/bin/bash
##############################################################################
# Install system packages #
##############################################################################
xcode-select --install
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
# install homebrew
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.