Categories
linux python

Python package manager

Ruby have its gem command to install package and python have pip. Since python 3.4, pip is included to default install.

On my linux mint pip command is pip3 and i try to list installed package with pip list command.

To install a package try : pip install <package name>

To search a package try : pip search <searched word>

 

Categories
c++ linux postgresql

Trying postgresql c++ interface : pqxx

Postgresql database have an official interface to C programming language and a C++ interface derived from that. C++ is a different language from C and i think it will be more easier to deal with.

Lets give a try on the newest linux mint 20.

1. install libpqxx-dev package (sudo apt-get install  libpqxx-dev).

2. install codelite IDE (sudo apt-get install  codelite).

3. install postgresql (sudo apt-get install postgresql).

4. create an user (user1) for connecting to postgresql.

Categories
Java linux

Java Scripting on JDK 11

JDK 11 make java command can directly run source code like other scripting language or interpreter. Lets say we have a java source file called hello.java as follow.

public class Hello {
 
  public static void main(String[] args) {
    System.out.println(“Hello World!”);
  }
 
}
 
Run the file by executing :
java hello.java
 
It works!
 
 
 
End.
Categories
editor linux OpenBSD

Minimum Profit : A Programmer Text Editor

Minimum Profit is a text editor for programmer available to download from https://triptico.com/software/mp.html. I accidentally found this software from article related to OpenBSD and the author is the creator of this mp editor. The downloads are available in source and windows executable (Wow).

I managed to compile mp 5.38 on debian 10 using ncursesw driver which is already available on my laptop. Compilation step as follow.

Categories
editor linux

Playing with Emacs – Open file, edit, save file.

Emacs is an editor, but not just it. Thats what i read on internet. Emacs like in a battle with Vim, another editor. I have play with vi so many years ago, but with emacs  it is just recently i learned to use it basic function.

Install it on ubuntu we can choose GUI or terminal version. I like the terminal version because it will be handy during my engagement with VM/Cloud which only can use terminal to manage it.

Open Emacs by typing on terminal emacs and press enter, it will show a welcome page like below.

We can move cursor to a hyperlink and press enter to go to particular subject, like tutorial or manual. Tutorial can also accessed using key combination C-h t, which mean press Ctrl and hold then press h, release keys, then press t. C is Ctrl and M is Meta (Alt/Esc).

Categories
linux ruby ubuntu

“gem install pg sqlite3” required packages on ubuntu 18.04 LTS

apt-get install postgresql-client sqlite3

apt-get install libpq-dev libpqtypes-dev libsqlite3-dev

gem install pg sqlite3

Categories
DragonflyBSD editor linux OpenBSD

Create text file with ed

Unix alike system have ed for editing text file which is i feel strange at first. I learned some time ago to create small text file out of curiosity.

Lets try by creating a text file containing 3 lines.

  1. type ed on terminal
  2. type a then enter (a is append command in ed)
  3. type your text file content.
  4. To end input mode type . then enter on a line.
  5. Type w filename.txt then enter to save to a file.
  6. Type q to quit from ed.

Here we will show in a terminal.

Categories
arduino linux

Starting Arduino Uno with IDE on Linux

To start arduino programming go to web site arduino.cc and download arduino IDE software for linux. Choose linux 32 or 64 bit depend on your installed linux.

Extract downloaded archive.

Install it using root user (execute install.sh from extracted folder).

Categories
fossil scm linux

Creating fossil repository and commit some files

Here i try to use fossil to create a new repository file named bprs.fossil that will contain files from a java project. After doing fossil init to create the repository file then im opening the repo on a directory named bprs_checkout.

Categories
euphoria linux

Euphoria built in editor

Euphoria still have its own editor written in euphoria called edx.

To call edx one must type eui <path to edx.ex> which is too much to type 🙂

There is a way on euphoria to bind an ex script to interpreter to create an executable using eubind. Here is how i do it on linux.