Skip to content

Instantly share code, notes, and snippets.

View alireza-a's full-sized avatar
💀
soon this account turns to dust

Eva alireza-a

💀
soon this account turns to dust
View GitHub Profile
@alireza-a
alireza-a / aws_cli_chrome_os.md
Created May 20, 2016 21:11
How to install AWS CLI on Chrome OS

How to install AWS CLI on Chrome OS

Why

All my projects are in docker containers in an AWS EC2 instance. To keep the cost down I stop the instance every time I finish coding.

Being a student and taking classes forces me to take breaks and restart my instance multiple times a day. Going to AWS console, restarting the instance then copying the public DNS to SSH into the instance quickly becomes tedious.

Enable developer mode

@alireza-a
alireza-a / generate_checklist.md
Last active March 12, 2018 01:00
Ruby Koans checklist

generate checklist

$ grep -r 'def test_' ruby_koans/src > koans_def.txt

ruby script to generate the checklist

def koans_def(path: 'koans_def.txt')
    koans = Hash.new{|hash, key| hash[key] = Array.new}
    File.readlines(path).map do |line|
 about, koan = line.split(/def test/)
@alireza-a
alireza-a / mentioned_in_model_thinking.md
Last active March 29, 2019 22:08
a list of books and articles mentioned by professor Scott E. Page during the Model Thinking course by Coursera

Why Models ?

  1. Response Surface Methodology by George E. P. Box
  2. Expert Political Judgment by Philip E. Tetlock

Segregation and Peer Effects

  1. Micromotives and Macrobehavior by Thomas C. Schelling
  2. The Big Sort by Bill Bishop
  3. Connected by Nicholas A. Christakis, James H. Fowler

Aggregation

@alireza-a
alireza-a / also_be_comfortable_with.md
Last active March 25, 2018 22:03
interview checklist

Basic data structures & algorithms

  • Stack
  • Queue
  • Linked List
  • Binary Search

Others

Most of the following is covered in 6046

  • Quick sort
  • NP complete problems knapsack and traveling salesman
@alireza-a
alireza-a / BST_Stream_ReasonML.re
Last active November 17, 2018 20:16
A Purely Functional Binary Search Tree With Streaming API in ReasonML
/**
Learn more about thunks, delay, force and streams from
Purely Functional Data Structures by Chris Okasaki
https://www.cs.cmu.edu/~rwh/theses/okasaki.pdf
*/
type thunk('v) = unit => 'v;
let force: thunk('v) => 'v = thunk => thunk();
let delay: 'v => thunk('v) = (value, ()) => value;
type stream('v) =
@alireza-a
alireza-a / simple_stack.wat
Created December 23, 2018 08:12
A simple stack in WA
(module
(func $needs_more_space (result i32)
block (result i32) ;; available space
get_global 1
i32.const 128 ;; 128 bytes = 1024 bits
i32.const 64
i32.mul
i32.mul
end
block (result i32) ;; next index