teleren/devto huggingface dataset:
How to Install Synaptic Package Manager in Ubuntu Linux
Tags: opensource, howto, linux, ubuntu
Published: 2018-08-28 13:11:46

---
title: How to Install Synaptic Package Manager in Ubuntu Linux
published: true
tags: FOSS,HowTo,Linux,Ubuntu
canonical_url: https://fossnaija.com/how-to-install-synaptic-package-manager-in-ubuntu-linux/
---

[![synaptic_banner](https://i2.wp.com/fossnaija.com/wp-content/uploads/2018/08/synaptic_banner.png?resize=665%2C492&ssl=1)](https://i2.wp.com/fossnaija.com/wp-content/uploads/2018/08/synaptic_banner.png?ssl=1)

Synaptic is a graphical package management program for apt. It provides the same features as the apt-get command line utility with a GUI front-end based on Gtk+. If you prefer using a GUI to install apps in [Debian and Debian-based systems](https://dev.to/xeroxism/how-to-install-ubuntu-software-deb-package-from-the-command-line-3gn0) ([ubuntu](https://fossnaija.com/i-love-ubuntu-linux/), mint, etc) synaptic would make it worthwhile.

 

[![synaptic_screenshot_1](https://i2.wp.com/fossnaija.com/wp-content/uploads/2018/08/synaptic_screenshot_1.png?resize=665%2C436&ssl=1)](https://i2.wp.com/fossnaija.com/wp-content/uploads/2018/08/synaptic_screenshot_1.png?ssl=1)

 

## 

## 

## 

## Features:

| 
- Install, remove, upgrade and downgrade single and multiple packages.
- Upgrade your whole system.
- Manage package repositories (sources.list).
- Find packages by name, description and several other attributes.
- Select packages by status, section, name or a custom filter.
- Sort packages by name, status, size or version.
- Browse all available online documentation related to a package.
- Download the latest changelog of a package.
- Lock packages to the current version.
- Force the installation of a specific package version.
- Undo/Redo of selections.
- Built-in terminal emulator for the package manager.
- Debian/Ubuntu only: Configure packages through the debconf system.
 | |

 

[![synaptic_screenshot_3](https://i2.wp.com/fossnaija.com/wp-content/uploads/2018/08/synaptic_screenshot_3.png?resize=536%2C529&ssl=1)](https://i2.wp.com/fossnaija.com/wp-content/uploads/2018/08/synaptic_screenshot_3.png?ssl=1)

# 

# How to install:

On the command [terminal](https://dev.to/xeroxism/6-commands-you-must-know-to-be-productive-on-the-terminal-h9a) (SHORTCUT=> Ctrl+Alt+T), enter:

```
sudo apt-get update

sudo apt-get install synaptic
```

Ubuntu 16.04 (Xenial)was used here. You could grab the binary (.deb) package from [here](https://packages.ubuntu.com/xenial/synaptic).

 

After installation you can now use synaptic to install/upgrade/remove any software package you want in your system. Using the search feature you can just type in the name of the software package you want to install and then synaptic would do the search for you and install it along with it dependencies.

 

**Happy Linux’NG!**

 

The post [How to Install Synaptic Package Manager in Ubuntu Linux](https://fossnaija.com/how-to-install-synaptic-package-manager-in-ubuntu-linux/) appeared first on [Foss Naija](https://fossnaija.com).
Add Docker to Elixir/Phoenix projects in one command
Tags: elixir, phoenix, docker
Published: 2018-08-23 11:22:32

---
title: Add Docker to Elixir/Phoenix projects in one command
published: true
description: A simple way to add basic docker files to your new or existing Docker projects.
tags: Elixir, Phoenix, Docker
---

Recently, I've been writing a tonne of Elixir code, some Phoenix websites and a few other small Elixir applications. One thing that was bugging me every time I would create a new project is that I would want to add Docker to it either straight away because I knew there would be a dependency on Redis or Postgres etc, or halfway through a project and it would really slow down the speed at which I could hack something together.

One of the things that I love about Elixir is how quickly you can get started writing an application, whether it's a web app or it's got supervision trees coming out of its ears.
In any case, I found myself going back to old projects where I had used Docker, copying over a few necessary files to get started, with the workflow that I was used to.

## exdocker
So I decided to try to fix this problem in an Elixir CLI application (Escript). It really doesn't do much, it writes some files and does some string replacements to make setting up docker easy.
I called it [exdocker](https://github.com/jackmarchant/ex_docker) because I'm not as creative as I used to be.

### Installation
Make sure `~/.mix/escripts` is in your machine's `$PATH`. You can do this by adding `export PATH=~/.mix/escripts:$PATH` to your `.bashrc` or similar file.
1. `mix escript.install hex ex_docker`
2. `source ~/.bashrc` - load the escript and `$PATH` update

### Usage
- Create a new Elixir project
  `mix phx.new my_project`
  `exdocker my_project`
- Add to an existing Elixir project
  `exdocker my_project` or `exdocker .` to run it in your current directory.

Three files get created in the root of your project:
- docker-compose.yml - configuration of your docker containers
- Dockerfile - Specify what needs to be installed for Elixir/Phoenix to run
- Makefile - Convenient targets for docker-compose commands

You can then run make init shell from the root to build and run Docker containers, and when this command finishes, you'll be inside a shell session with Elixir and Mix installed so you can continue development as usual.

Any other time you need to use it, it will be available to execute with `exdocker`.

Be sure to let me know if you found this useful!
Basic Python Programming (part 1)
Tags: python, softwarelab, muict
Published: 2018-08-20 18:25:25

---
title: Basic Python Programming (part 1)
published: true
description: Software Lab for Basic Scientific Problem Solving
tags: Python, Software Lab, MUICT 
---
###Writing Python in Command Prompt

Start: Python (needs to install Python PATH first) > cmd shell (Window + R > cmd) > type 'python'
    
End: Ctrl + z, or exit()

####printing
::syntax::

```python
>>> print("string")
>>> print(variable)
>>> print(
... "string"
... )
>>> print("Hello world");\
... print("next line eiei")
```

####string
```python
>>> print("this is" + " appending")
>>> print(len("len = string length"))
```

####variable
```python
>>> variable_name = "any type value, but this is string"
>>> example = 10;\
... print(example)  //output: 10
```

variable types: bool (true, false), int (integer), float (rational number), str (string)

::conversion::
int(x)
float(x)
str(x)

::syntax::

```python
>>> year = 1999; month = 'March'
>>> print(f"Birthday is {month}, {year}") //output: Birthday is March, 1999
>>> x = 5; y = 10
>>> print(x, y) //5 10
```

####FILE
#####open / write / close

```python
>>> variable_file_name = open("destination/file_name.txt", "w") //w is open new file (reset the file)
>>> variable_file_name.write("string \n means new line")
>>> variable_file_name.close()
```

#####read

```python
>>> file = open("destination/file_name.txt", "r") //r is read only which means cannot edit
>>> file.read() //read all
>>> file.read(n) //read n characters
>>> file.readline //read a line
>>> file.close()
```

#####append

```python
>>> file = open("destination/file_name.txt", "a") //a means appending the file
>>> file.write("add/append text here")
>>> file.close()
```
How to keep writing?
Tags: help
Published: 2018-08-23 09:21:23

---
title: How to keep writing?
published: true
tags: help
---

After a very enjoyable stint of traveling and _not_ working at all, I dove back into web development head-first last year and had a great time doing some freelance work and writing tech/development related articles and tutorials. 

When I took a new position as front-end developer, I hoped to keep up my blogging, but after 5 months I must say I've failed miserably! My blog is dying, my dev.to contributions are dwindling and my to-do list is filled with article ideas I want to finish one day. I'm just not sure how when working the ol' 9-5.

Tips, ideas and suggestions are welcome 

PS, I'm an avid fan of 'GTD' but my article ideas keep on being shoved over to the 'long term' list 😅
PHP Devs: Explain to me PHP 7's performance boost!
Tags: discuss, php
Published: 2018-08-23 07:52:55

---
title: PHP Devs: Explain to me PHP 7's performance boost!
published: true
description: Why is PHP 7 100% faster than PHP 5??
tags: discuss, PHP
---

Hello, PHP community.

As you already know, PHP 7 offers a huge performance boost, whether it is the memory usage, or the requests per second (which is almost doubled).

Now, we know this is due to the new Zend Engine 3. Let me quote from the Rogue Wave (Zend) website : 
"Thanks to the new Zend Engine 3.0, your apps see up to 2x faster performance and 50% better memory consumption than PHP 5.6, allowing you to serve more concurrent users without adding any hardware."

Can you guys explain to me, or at least find me references/articles/docs, what are the reasons that PHP 7 is that much better performing than PHP 5.6? What are those changes in Zend Engine 3 that make all the difference?

I'd appreciate both your explanations or any articles you can find for me to read.

Thanks!
How do you keep your body hydrated during working hours?
Tags: discuss, healthy, body, water
Published: 2018-08-23 06:20:15

---
title: How do you keep your body hydrated during working hours?
published: true
description: What are your routines / tricks to keep your body hydrated during work?
tags: discuss,healthy,body,water
---

It happens to all of us and unfortunately too often: we drink far too little or even forget to drink completely while we are in _the flow_.

Here is how I try to drink enough:
- Having a 1L bottle _(refillable)_ of water on my desk
- Having an alarm set to every hour with a small note "drink a glass"
- If I leave the office, my bottle has to be empty. If not, I must drink it before leaving.

I am thrilled with the "Urban Bottle" from "green your life":

![Urban Bottle](https://static.green-your-life.de/item/images/3316/middle/Trinkflasche--Urban-Bottle--aus-Edelstahl-1-Liter-_6.jpg)


So let's share and collect:
**What are your routines, which reminders do you use, how do you ensure to keep yourself hydrated during work?**
How to start contributing to open source?
Tags: help, python, data, opensource
Published: 2018-08-23 06:09:25

---
title: How to start contributing to open source?
published: true
description: I am a python developer looking to contribute to open source projects
tags: #help #python #data #opensource
---

I have been programming in python for 3 years now and worked with Flask Framework, python's Data Analysis libraries(numpy, pandas, matplotlib, seaborn) and some machine learning in scikit-learn but I still haven't contributed to any open source project and I really want to contribute back to Python community. I try to look at libraries and contribute but usually I don't understand the code.

Can someone help me with a beginner guide to open source projects?
What if Kotlin Coroutines can make our life better?
Tags: discuss, koltin, android, rxjava
Published: 2018-08-23 05:43:58

---
title: What if Kotlin Coroutines can make our life better?
published: true
description: 
tags: #discuss #Koltin #Android #RxJava
---

Kotlin coroutines can be a powerful replacement for RxJava in an Android project.
Do you agree?
Looking for some interesting things from all android devs.
Please comment, reply, write, add....
Just got my first job offer, going to take it. What are some tips for being the best junior developer I can be?
Tags: firstjob
Published: 2018-08-23 05:35:33

---
title: Just got my first job offer, going to take it. What are some tips for being the best junior developer I can be?
published: true
description: 
tags: firstjob
---

Yesterday I got my very first developer job offer. Will be working with React, Node and MariaDB primarily.

What are some tips the more senior of you have for a junior starting his first job? :D

Edit: I really appriciate all the advice you guys are giving me, thank you so much!
Do you put examples/ directory with sample code for integrating your library?
Tags: discuss, faq, opensource, example
Published: 2018-08-23 05:30:42

---
title: Do you put examples/ directory with sample code for integrating your library?
published: true
description: 
tags: discuss, faq, opensource, example
---

For me I do it sometimes, mainly when usage is complex and not everything belongs to readme.
How difficult problem in pdf solved by just creating it
Tags: jspdf, pdfkit, javascript, pdfmake
Published: 2018-08-23 05:27:33

---
title: How difficult problem in pdf solved by just creating it
published: true
description: Pdf post
tags: jsPdf, pdfKit, javascript, pdfMake
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mdettw3n455fjdhfge6y.jpg
---

Yes! in programming the thing that gave me blow was creating PDF having URL images.

I Used a lot of methods for it but all were with some corns and pros. e.g if you are able to load replica of the table on PDF then the problem was with loading URL images e.g Amazon S3, google images etc. Here I will describe to you what technology I used what methods I applied for generating pdf.

**_TECHNOLOGIES:_**

JavaScript(Client Side), NodeJS (Server Side)

**_METHODS or PACKAGES:_**

[jsPDF] (https://parall.ax/products/jspdf), [PDFMake] (http://pdfmake.org/#/), [PDFkit] (http://pdfkit.org/)

**_DESCRIPTION ABOUT TECHNOLOGIES AND PACKAGES:_**

As using these technologies and methods I have some points that will help you to use efficiently

Using jsPDF and PDFMake You can generate a PDF file having static data and images easily.

When it comes to URL based images it becomes difficult to load directly to PDF file we can load images to PDF file by using some JavaScript methods like a canvas which first use URL images as its function parameter then convert it into a Base64 string which then can be used by jsPDF or PDFMake’s methods.

Now if we have images and table’s data both but there will be another problem of converting numbers of images to base64 and it is hanging of application.

So I found a way for converting PDF file is the PDFkit. it is the practice of converting PDF file, the only thing that it requires is hit and trail, the method that best for it according to me is PDFkit as mentioned. it all requires server-side support like file system, request packages 

```
e.g var fs = require(‘fs’), 
var request = require(‘request’);
```
Request method basically overcomes the base64 issue what it does it take image URLs and make it buffer the pdfkit used that buffer data and load it to PDF page without hanging application. pdfkit even support many properties like decorating text with font property, geometries like line, triangle, square and many all you just need apply hit and trial and you will get an almost same table with the dynamic images example you want to create pdf for vehicle inspections.

Thanks for reading ;)

You can find me on Twitter as [@shubhu_off_base](https://twitter.com/shubhu_off_base)
Install Groovy with ZSH (plus automation in Jira & Confluence)
Tags: java, beginners, zsh
Published: 2018-08-22 15:48:18

---
title: Install Groovy with ZSH (plus automation in Jira & Confluence)
published: true
description: A quick guide for setting up Groovy for ZSH shell 
tags: java,beginners,zsh
---

**Full disclosure**: I work for Atlassian. As a result, I spend a great deal of time creating, updating, and reading Confluence pages. While Confluence server and cloud both have APIs which can be used to programmatically update/create pages, Adaptavist created an app called [ScriptRunner](https://marketplace.atlassian.com/apps/1215215/scriptrunner-for-confluence) which makes this easier with built-in scripts and pre-written logic. My end-goal is to automate some common, reoccuring tasks either by checking a Jira issue for updates or another confluence page. Most Atlassian applications are written in Java and ScriptRunner uses a flavor of Java called Groovy.

## Step 1: install Groovy on OS X

For Homebrew users:

```bash
brew install groovy
```

For MacPorts users:
```bash
sudo port install groovy
```

## Step 2: Set Groovy_home environment variable

You are welcome to do this entirely in zsh, but I manually added it to my `~/.zshrc` file. Another note is I have Sublime set up to launch from the command line. If you prefer vim, emacs, or another text editor, you will need to substitute references to `subl`.

```bash
subl ~/.zshrc
```
Within `~/.zshrc`, I'm adding the following variable export and comment: 

```
# Add Groovy Home path
export GROOVY_HOME="$(/usr/local/opt/groovy/libexec)"
```
Save this file, then you can close it once you're done.

## Step 3: Run a test to check your Groovy install

```bash
mkdir groovy-test && cd groovy-test
subl hello.groovy
```
Now, add a test script to the empty file you just created:
```java
//hello.groovy
println "hello, world"
for (arg in this.args ) {
    println "Argument:" + arg;
}
// this is a comment
/* a block comment, commenting out an alternative to above:
this.args.each{ arg -> println "hello, ${arg}"}
*/
```

Save this file, then you can close it once you're done.

Run it with the following:
```bash
groovy hello.groovy MyName yourName HisName
```

## Step 4: Start using Groovy to automate tasks in Jira or Confluence

As I mentioned before, Adaptavist offers some built-in scripts but I find my needs are more complex. There are some good examples floating around the web to help get started.

* [Create Confluence page](https://gist.github.com/jechlin/cf9ccb524918993872d5)
* [ScriptRunner examples for Confluence Cloud](http://scriptrunner-docs.connect.adaptavist.com/confluencecloud/script-listeners.html#_examples)
* [ScriptRunner samples for Bitbucket, Bamboo, Confluence, and Jira](https://bitbucket.org/Adaptavist/scriptrunner-samples/overview)
* [Best practices for ScriptRunner behaviors for Jira](http://www.coyotecrk.com/best-practices-scriptrunner-behaviours/)
Install IDES Line Command Ubuntu
Tags: programming, ruby, ubuntu, ides
Published: 2018-08-23 04:23:08

---
title: Install IDES Line Command Ubuntu
published: true
description: 
tags: Programming, Ruby, Ubuntu, IDEs
---

I love PhpStorm, WebStorm, and RubyMine for install in Ubuntu through command line is very easy, look:

PhpStorm:
`
sudo snap install phpstorm --classic
`


WebStorm:
`
sudo snap install webstorm --classic
`
RubyMine:
`
sudo snap install rubymine --classic
`

Thank!
My First Hellow Word
Tags: programming, c
Published: 2018-08-23 04:19:42

---
title: My First Hellow Word
published: true
description: 
tags: Programming, C++
---

My first program inteligent was with pencil and paper, **Yes Really!**, 1995 a computer was is not possible for buy, because I was 17 years old,
not working, my parents give me all, ehhhh; Ok, the basic, like money for the university, three food for day, clothes, shoe, only that, for me is OK,
because was just I need.

The closest a computer was  in my head, in my imagination or in laboratory of my University.

My first hours the programming was Pascal, C, and C++, they was the languages in that years, was my first program was not print "Hello Word" else a sort arrays
with 100 numbers and exploit my head, was very amazing for me.In vacations my notebook it was my way of letting go of my desire to program and
remember clearly that was switch case of C for simulate IA (Inteligents Artifical),Jajajajajaajajaja, like that:

```
#include <stdio.h>
int main()
{
   char a;
   printf("Is not Raining Now?...(Y)es-(N)o \n");
   scanf("%c", &a);
   switch(a)
   {
    case 'N' :
        printf("Then Is Raining, Human!\n");
        break;
    case 'Y' :
        printf("Is not Raining, Human!\n");
        break;
   }
   return 0;
}

```

Realy that code is amazing for me in 1995 and my notebook was look very pretty

I hope will like my post.

See soon.
Update Npm and Node
Tags: npm, node, ubuntu
Published: 2018-08-23 04:15:34

---
title: Update Npm and Node
published: true
description: 
tags: Npm, Node, Ubuntu
---

Update npm and nodejs in Ubuntu.

Step 1 -> `npm install -g n`

Step 2 ->`sudo n stable`

Step 3 -> `sudo npm install npm -g`

Last One -> `npm --version and nodejs --version` look the new version
Rails Migrations
Tags: rails, ruby, framework
Published: 2018-08-23 04:14:39

---
title: Rails Migrations
published: true
description: 
tags: Rails, Ruby, Framework
---

Rails Framework is very interesting, because put layer between programmer and database, you name is ActiveRecord,
very nice library of ruby for manipulate, data, structure of table and manipulate object of database for all Database, example:MySql, Postgresql,
SQLite,Oracle,Sybase,SQL-Server, etc.

For me, the most interesting are the migrations, because, we can control of version of database and this is very importante, for project large.

We can to do, on the console:

Example simple:

Inline `rails generate migration Person`.

Example Simple, but nice, with this example we can create inmmediately the script for create table on Database:

Inline `rails generate migration Person name:string address:string`.

ActiveRecord is a ORM ->Object-Rol Modeling and the with more Security.
Powerline for Ubuntu
Tags: linux, ubuntu, shell
Published: 2018-08-23 04:13:21

---
title: Powerline for Ubuntu
published: true
description: 
tags: Linux, Ubuntu, Shell
---
![](https://thepracticaldev.s3.amazonaws.com/i/d1bwwtixojkmk2eui2t2.png)


1-Firts Step -> Write in you console: `sudo apt install powerline`.

2-Second Step -> Write in .bashrc in you home directory this:
 `if [ -f /usr/share/powerline/bindings/bash/powerline.sh ]; then
    source /usr/share/powerline/bindings/bash/powerline.sh
fi`.

3-Last Step -> Save the file, and open new console o terminal and will see

4-If exists problem like weir character in line command them install fonts:

`
clone
git clone https://github.com/powerline/fonts.git --depth=1
install
cd fonts
./install.sh
clean-up a bit
cd ..
rm -rf fonts`

here this link where is repository fonts: https://github.com/powerline/fonts
Ip public Line command
Tags: ip
Published: 2018-08-23 04:11:58

---
title: Ip public Line command
published: true
description: 
tags: Ip
---

Hi, i was problem, i dont know get ip of server in AWS from console and i was searching in the web and saw for this:

`curl ipinfo.io/ip`

This return `190.xxx.xxx.xxx`

See soom!
Brakeman
Tags: rails, ruby, programming, security
Published: 2018-08-23 04:11:01

---
title: Brakeman
published: true
description:  Brakeman for Rails
tags: rails, ruby, programming, security
---

The security tool of application in RoR, very nice tools

Intalation -> `gem install brakeman`

View version -> `brakeman --version`

Run the tool insite the application for output the file html -> `brakeman -o brakeman.html`

The tool show this ->

<dl>
  <dt>Result</dt>
  <dd>
Loading scanner... <br>
Processing application in /home/user/aplication <br>
Processing gems... <br>
[Notice] Detected Rails 5 application <br>
Processing configuration... <br>
[Notice] Escaping HTML by default <br>
Parsing files... <br>
Processing initializers... <br>
Processing libs...ed <br>
Processing routes... <br>
Processing templates... <br>
Processing data flow in templates... <br>
Processing models... <br>
Processing controllers... <br>
Processing data flow in controllers... <br>
Indexing call sites... <br>
Running checks in parallel... <br>
 - CheckBasicAuth <br>
 - CheckBasicAuthTimingAttack <br>
 - CheckCrossSiteScripting <br>
......

  </dd>
</dl>
Install Material Designer and Angular6
Tags: angular, javascript
Published: 2018-08-23 04:10:45

---
title: Install Material Designer and Angular6
published: true
description: Angular, Javascript
tags: angular, javascript,
---

I like angular, Yes!!....a like, but right now is very pretty for all developer in the word,
to install angular6 and material is very easy, you don't believe me?...look this:

With this you can install materia+angular6+nav:

`
ng generate @angular/material:material-nav --name <you-component-name>
`

But you think, nothing else?....I say nop, there is more, look:


`
ng generate @angular/material:material-dashboard --name <you-component-name>
`

I hope that yout like it!