Skip to content

Instantly share code, notes, and snippets.

View Psycadelik's full-sized avatar
💎
Drawing constellations

Adrian Psycadelik

💎
Drawing constellations
  • Nairobi
  • 00:48 (UTC +03:00)
View GitHub Profile
@Psycadelik
Psycadelik / installing-node-with-nvm.md
Created October 15, 2022 09:37 — forked from d2s/installing-node-with-nvm.md
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
@Psycadelik
Psycadelik / lamda_calculus_from_the_ground_up.py
Created August 13, 2022 11:42 — forked from TralahM/lamda_calculus_from_the_ground_up.py
Lambda Calculus from the ground up in pure functional python: from basic boolen,to arithmetic, to recursion, to the all famous Y-combinator all using pure python functions
def TRUE(x):
return lambda y: x
def FALSE(x):
return lambda y: y
def NOT(x):
return x(FALSE)(TRUE)
@Psycadelik
Psycadelik / curl.md
Created December 24, 2021 13:43 — forked from subfuzion/curl.md
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.

@Psycadelik
Psycadelik / jq-cheetsheet.md
Created December 10, 2021 11:43 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

$ mkdir -p ~/.config/autostart
$ cat <<EOF > ~/.config/autostart/conky.desktop
[Desktop Entry]
Type=Application
Exec=/usr/bin/conky
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=conky
Comment=
create a ~/.conkyrc file and paste this
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
Any original torsmo code is licensed under the BSD license
All code written since the fork of torsmo is licensed under the GPL
Ensure you have a windows 10 iso file for this:
- sudo apt install extlinux
- mkdir ~/bin/
- cd ~/bin/
- curl -L https://git.io/bootiso -O
- chmod +x bootiso
To list your usb pen drive run:
~/bin/bootiso -l
After dual booting Windows 10 and ubuntu 20.04, you may notice that the grub menu doesn't appear and boots directly to Ubuntu.
The following are steps to regain the grub menu.
log into ubuntu and follow the following steps:
- sudo nano /etc/default/grub
- Edit the following line:
GRUB_TIMEOUT_STYLE=menu
- uncomment the following line:
@Psycadelik
Psycadelik / knight-moves.js
Created July 25, 2020 20:36 — forked from seyfer/knight-moves.js
Toptal Codility Problem: Can Knight reach square?
'use strict';
function getNextPositions(start) {
var moves = [
{ x: -2, y: -1 },
{ x: -2, y: +1 },
{ x: -1, y: -2 },
{ x: -1, y: +2 },
{ x: +1, y: -2 },
{ x: +1, y: +2 },
@Psycadelik
Psycadelik / System Design.md
Created July 15, 2020 09:04 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?