Skip to content

Instantly share code, notes, and snippets.

View tonyslowdown's full-sized avatar

Joseph tonyslowdown

  • San Francisco Bay Area
View GitHub Profile

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@subfuzion
subfuzion / curl.md
Last active July 18, 2024 17:12
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l
@ryubro
ryubro / Starbucks wifi login
Last active April 26, 2019 23:18
스타벅스 wifi 자동 로그인 북마클릿
var frm=document.pageForm;
var firstURL = "http://first.wifi.olleh.com/starbucks/index_en_new.html";
var secondURL = "https://first.wifi.olleh.com/starbucks/starbucks_en.php";
switch(window.location.href) {
case firstURL:
document.getElementById('stCheck').checked = false;
NextPage('0');
break;
case secondURL:
frm.cust_email_addr.value = Math.random().toString(36).replace(/[0-9\.]/g, "").substring(0,Math.floor(Math.random()*10)+2)+"@"+["yahoo.com","hotmail.com"][Math.floor(Math.random()*2)];
@danielsnider
danielsnider / .screenrc.multiwin
Created June 18, 2014 20:00
This GNU Screen config will open 13 terminals and stuff text into some of them to start do this by default. Launch GNU Screen with this command "screen -D -R -S danscreen -c .screenrc.multiwin"
startup_message off
vbell off
defscrollback 5000
#backtick 1 60 60 $HOME/.screenrc.acpi # .screenrc.acpi contains 1 line: acpi | awk -F ', ' '{print $2}'
hardstatus alwayslastline
@goyalankit
goyalankit / bash_to_zsh_history.rb
Last active October 28, 2023 05:07
Import bash history to zsh history.
#################################################################
# = This script transfers bash history to zsh history
# = Change bash and zsh history files, if you don't use defaults
#
# = Usage: ruby bash_to_zsh_history.rb
#
# = Author: Ankit Goyal
#################################################################
# change if you don't use default values