Skip to content

Instantly share code, notes, and snippets.

View nicokosi's full-sized avatar

Nicolas Kosinski nicokosi

View GitHub Profile
@nicokosi
nicokosi / docker-nightclazz-découverte.md
Last active August 29, 2015 14:14
Notes durant le Docker nightclazz découverte de Zenika, le 05/02/2015

Docker nightclazz découverte

05/02/2015 par Mario Loriedo & Vincent Demeester

C'est une intro, prochaine session dans 1 mois

Intro

  • outil pour partager env de dev et env de prod (sysadmin) #devops: "build, ship and run" via conteneurs => + rapide, automatisation
// array
var myArray = [1, 2, 3];
// set
var mySet = { "foo": true, "bar": true, "baz": true };
set.foo // true
set.notExists // false
var object = { id: 126878, name: "ZALTRAP 25 mg/ml sol diluer p perf", sid: "vidal://product/126878", title: "ZALTRAP 25 mg/ml sol diluer p perf" };
@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"