Skip to content

Instantly share code, notes, and snippets.

View nicokosi's full-sized avatar

Nicolas Kosinski nicokosi

View GitHub Profile
@nicokosi
nicokosi / proglang.rb
Last active August 29, 2015 14:09
Notes about Coursera "Programming Languages": https://www.coursera.org/course/proglang - part 3 (Ruby)
Part 3
Introduction to Ruby {
Our focus {
Pure Object-Oriented
no primitives (even numbers)
Class-based
Every object has a class that determines behavior (like Java)
@nicokosi
nicokosi / proglang.rkt
Last active June 4, 2017 09:29
Notes about Coursera "Programming Languages": https://www.coursera.org/course/proglang - part 2 (Racket)
( Introduction to Racket:
Racket:
- functional focus
- with imperative features
- dynamically-types
- minimalist syntax
- advanced features: modules, macros, etc...
(note: we will not use pattern matching, but it exists)
@nicokosi
nicokosi / proglang.sml
Last active February 9, 2017 19:30
Notes about Coursera "Programming Languages": https://www.coursera.org/course/proglang - part 1 (ML)
Programming languages
(* Emacs tips :
open file: ctr-c ctr-f
copy: M-w, paste: ctr+y
save file: ctr+x ctr+s,
next/previous buffer: ctr+x left/right:
start REPL: ctr+c ctr+s sml, stop REPL: ctr+c ctr+d
stop command interpreter: ctr-g
split window vertically: C-x 2
-- http://learnyouahaskell.com
-- Starting out
-----------------------------------------------------------------------------------
-- baby's first functions http://learnyouahaskell.com/starting-out#babys-first-functions
doubleMe x = x + x
doubleUs x y = doubleMe x + doubleMe y
doubleSmallNumber x = if x > 100
then x
@nicokosi
nicokosi / git-cheat-sheet.sh
Last active February 19, 2024 06:11
My own git cheat sheet
### BRANCHES
git checkout -b <branch name> # Create a branch
git branch -r # List remote branches
git checkout <branch name> # Switch to branch (deprecated)
git switch <branch name> # Switch to branch
git checkout <commit ID> # Locally retrieve an old revision
git fetch # retrieve remote changes (commits) without changing local repo ; can be used to fix sync issue
git branch -D branchName # delete local branch
git branch -m <newname> # rename current local branch
git push origin --delete <branchName> # delete remote branch
@nicokosi
nicokosi / progfun04
Last active November 16, 2018 01:51
My notes from Coursera course "Functional Programming Principles in Scala" (https://class.coursera.org/progfun-004).
Notes from Coursera course 'Functional Programming Principles in Scala":
https://class.coursera.org/progfun-004
✔ Week 1: Functions & Evaluations @done (14-05-01 17:20)
✔ Lecture 1.1 - Programming Paradigms (14:32) @done (14-04-27 17:54)
3 paradigms: imperative, functional, logic
OO: orthogonal
imperative:
@nicokosi
nicokosi / varnish.md
Last active September 3, 2021 07:47
Varnish notes

Varnish

Intro

  • "HTTP reverse proxy" => server-side HTTP cache => HTTP accelerator
client 1    --- GET foo --->    Varnish    --- GET foo --->    web app    (cache miss)
client 2    --- GET foo --->    Varnish    (cache hit)
  • Linux-only, OSS, *nix philosophy (command tools)
@nicokosi
nicokosi / collinear-timings-brute-vs-fast.R
Last active August 29, 2015 13:56
R code that generates graph for collinear detection, week 3 assigment from Coursera MOOC "Algoritms, part I" (https://www.coursera.org/course/algs4partI). N.B.: input CSV file contains this kind of data: "n,time,algo\n10,0.497,brute\n10,0.006,fast\n# etc...".
# R code that generates graph for collinear detection, week 3 assigment from Coursera MOOC "Algoritms, part I" (https://www.coursera.org/course/algs4partI). N.B.: input CSV file contains this kind of data: "n,time,algo\n10,0.497,brute\n10,0.006,fast\n# etc...".
library(ggplot2)
d <- read.csv("collinear-timings-brute-vs-fast.csv")
d$algo <- factor(d$algo)
levels(d$algo)[levels(d$algo)=="brute"] <- "Brute force"
levels(d$algo)[levels(d$algo)=="fast"] <- "Fast"
@nicokosi
nicokosi / IntelliJ IDEA shortcuts.mkdown
Last active August 29, 2015 13:56
My favourites IntelliJ IDEA shortcuts.

IntelliJ IDEA shortcuts

search action: Ctrl + Shift + A

Navigation: open class by name: Ctrl + N open file by name: Ctrl + Shift + N goto anything: Ctrl + Alt + Shift + N recent files: Ctrl + E switch file: Ctrl + Tab

@nicokosi
nicokosi / Computing for Data Analysis - R lang - notes.tasks
Created January 31, 2014 10:05
Nicolas Kosinski's notes from Coursera course "Computing for Data Analysis" that teaches R basics for statistics: https://www.coursera.org/course/compdata
Nicolas Kosinski's notes from Coursera course "Computing for Data Analysis" that teaches R basics for statistics: https://www.coursera.org/course/compdata (session #4: https://class.coursera.org/compdata-004)
✔ R installation @done (14-01-21 10:59)
✔ Week 1 @done (14-01-22 07:55)
✔ What Makes R Different? (4:20) @done (14-01-21 12:08)
R mixes:
interactive (command-oriented) tool
programming lang
✔ How to Get Help (13:53) @done (14-01-21 12:37)
✔ Background and Overview (16:38) @done (14-01-21 15:39)