Smile every time you sudo

If you want your terminal prompt to look like this every time you sodo, please continue reading. note: i did on ubuntu so for other flavor, file path might be slightly different step 1. download this amazing ascii art text and move to /etc/sudoers.d/sudoers.lecture ❯ curl -O https://caferock.org/chris/groot.txt ❯ sudo cp groot.txt /etc/sudoers.d/sudoers.lecture step 2. edit /etc/sudoers (or /etc/sudoers.d/privacy) Defaults lecture = always Defaults lecture_file = /etc/sudoers.d/sudoers.lecture Let’s see this magnificent art <3 # reset timestamp ❯ sudo -k # some sudo command ❯ sudo -l Cheers!

February 18, 2021 · 1 min · Naoko Reeves

Useful Ubuntu Keyboard Shortcuts

See Useful keyboard shortcuts Addition to the above: Super + Space: Change input keyboard Ctl + Q: Close an application window Super + ↑ : Maxmize the application window. Super → or ← : Move the application window to left | right Cheers!

March 8, 2020 · 1 min · Naoko Reeves

Create and Extract tar.gz on Ubuntu

Create tar.gz archives tar czf new-tar-file-name.tar.gz file-or-folder-to-archive c - create new archive z - compress the archive using gzip f - use archive file Extract archives tar -xzf tar-file-name.tar.gz x - extract the archive. z - uncompress the archive using gzip. f - use archive file. Let’s do it. I only want to compress 3 files. When I extract archive what I want to see is files in the directory. $ tree file_dir/ file_dir/ ├── file1.txt ├── file2.txt └── file3.txt $ cd file_dir $ tar czf files.tar.gz . tar: .: file changed as we read it # moved files.tar.gz to different directory $ tar -xzf files.tar.gz $ ls file1.txt file2.txt file3.txt file_dir files.tar.gz Cheers!

August 7, 2019 · 1 min · Naoko Reeves

Install GraalVM and run ptyhon with debugger

What is GraalVM? GraalVM is a high-performance, embeddable, polyglot virtual machine for running applications written in JavaScript, Python, Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++. Here is the Official doc link Hmm… Okay, I have to see it. Let’s install Below is the way I installed GraalVM Community Edition on Ubuntu 18.04. For other platform, the official doc installation guide is here. # update this number to latest version from here: https://github.com/oracle/graal/releases version=1.0.0-rc15 wget https://github.com/oracle/graal/releases/download/vm-${version}/graalvm-ce-${version}-linux-amd64.tar.gz tar -xvzf graalvm-ce-${version}-linux-amd64.tar.gz # clean up rm graalvm-ce-${version}-linux-amd64.tar.gz # to wherever you want. mv graalvm-ce-1.0.0-rc15/ ~/bin/graalvm # if you want to make it permanent, put this in your bashrc export PATH=$HOME/graalvm/bin:$PATH Now that your graalvm/bin in your path, you’ll get the GraalVM versions of those runtimes. ...

April 14, 2019 · 3 min · Naoko Reeves

Install Python on Ubuntu

Check the latest version here At the time of writing, 3.8.0 is the latest and 3.8.5 has release candidate. Also make sure you have sqlite3, libbz2-dev and libffi-dev are installed sudo apt-get install libsqlite3-dev libbz2-dev libffi-dev version=3.8.5 wget https://www.python.org/ftp/python/${version}/Python-${version}.tgz tar xzvf Python-${version}.tgz cd Python-${version} # Linux (or any Unix-like system), the default prefix and exec-prefix are /usr/local. # thus you should be able to omit --prefix here # --enable-optimizations option for significant speed boost (10-20%) but much # slower build process ./configure --prefix /usr/local --enable-optimizations make sudo make install # OR if you want to skip creating the python link then: sudo make altinstall in case you want to remove and re-install it again cause some software was missing before installation ...

October 15, 2018 · 1 min · Naoko Reeves