Skip to content

Instantly share code, notes, and snippets.

@guoguo12
guoguo12 / pythagoras-tree.rkt
Last active December 25, 2015 04:47
Draws a Pythagoras tree using Racket's turtle graphics library. Read the article at http://aguo.us/writings/pythagoras-tree.html.
#lang racket
; pythagoras-tree.rkt:
; Draws a Pythagoras tree using Racket's turtle graphics library.
; Run this program from the terminal with `racket pythagoras-tree.rkt`.
(require graphics/turtles) ; raco pkg install htdp-lib
(turtles #t)
(define (pythagoras-tree side) ; starting position: center of square, facing east
@joepie91
joepie91 / vpn.md
Last active May 7, 2024 23:27
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@guoguo12
guoguo12 / calc.py
Last active April 18, 2018 18:56
A concise prefix notation calculator. Read the article at http://aguo.us/writings/prefix-notation.html.
#!/usr/bin/env python
"""calc.py: A concise prefix notation calculator."""
import regex # pip install regex
def calc_eval(exp):
"""Evaluates the given prefix notation expression.
Raises a SyntaxError if the input is not valid.
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active May 7, 2024 16:35
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 7, 2024 17:37
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@zyxar
zyxar / exercise.tour.go
Last active April 28, 2024 17:06
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)