- Linux is only a kernel (collection of drivers, task schedulers etc).
- Red Hat, Fedora, Ubuntu, Manjaro, Kali, NixOS etc. are OS distributions (uses the Linux kernel).
- Linux OSes can be used via CLI (suitable for servers) or GUI (suitable for personal laptops/desktops).
- Linux CLI
- sh
- bash
- csh
- ksh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
send() { | |
[ "$(cat /tmp/pipelock)" == "1" ] && return 0 | |
echo 1 > /tmp/pipelock | |
read -p "me ['q' to quit] : " msg | |
[ $msg == q ] && echo 0 > /tmp/pipelock && echo q > ~/mypipe && return 1 | |
echo $msg > ~/mypipe | |
echo 0 > /tmp/pipelock | |
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "rocker_app" | |
version = "0.1.0" | |
authors = ["Arijit Basu <sayanarijit@gmail.com>"] | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
rocket = "0.4.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Credits: | |
-- https://gist.github.com/bofm/70766566ecd4edee76f8f17ffa7362c9 | |
-- https://stackoverflow.com/questions/21649967/lua-equivalent-of-python-repr | |
local data = {} | |
local function noop(...) | |
return ... | |
end |
I hereby claim:
- I am sayanarijit on github.
- I am sayanarijit (https://keybase.io/sayanarijit) on keybase.
- I have a public key ASBLw7LpxU4kSCUZe2Ari3dNuh8BSX8yLqDoe5nP35R3HAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
/** | |
* Hypertext Transfer Protocol (HTTP) response status codes. | |
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} | |
*/ | |
enum HttpStatusCode { | |
/** | |
* The server has received the request headers and the client should proceed to send the request body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs-unstable> { }; | |
pkgs.mkShell { | |
buildInputs = with pkgs; [ | |
cargo | |
rustc | |
gcc | |
gnumake | |
rustfmt | |
rust-analyzer | |
clippy |