Deleting files inside a zip file on Linux

Deleting files inside a zip file on Linux

Blog Linux

Sometimes when we’re working with zip files, we need to remove some files inside it to doesn’t override another files during extraction. Linux has a special app to this, we’re talking about zip.

Debian based distros like Ubuntu, Mint, etc., already have this program installed, CentOS for instance doesn’t have installed, so, to install it you will do this:

To those distros, the way to use zip app it’s the same.

Deleting specific files inside a zip file

If you want to delete one or more specific files, you can do this:

Like /bin/rm command, this app also can receive N parameters on –delete arg.

If you want to delete directories inside a zip file, it is the almost same way, but you will add “/*” at the end of string arg. Bellow you have an example of it:

Pay attention to the last parameter, “directory3/sub-folder/*”, in this case, the folder “sub-folder” will be deleted from “directory3” folder.

Be happy : )

Removing deepin-translator from DDE

Removing deepin-translator from DDE

Blog Linux

Deepin is a Chinese Ubuntu-based distro that contains a powerful and very beautiful graphical interface called DDE (deepin-desktop-environment). This interface has a lot of usual features like side control panel, custom software center, an elegant dock menu and the main reason, no critical bugs like Gnome 3 or Unity. You can read more about Deepin here.

One of this features is deepin-translator, this plugin allows for user to quickly translate any selected text putting mouse cursor hover selected text or pressing Ctrl key hover this text. If you’re a developer, sometimes this resource let your work so awful on Eclipse, SQL editors, because you are all time selecting SQL statements to copy-past between editors and deepin-translator always appears hover your selected text, and sometimes it breaks your copy-paste.

To be free of this headache, you can kill the process or remove it from your system. I prefer remove this package, because I really don’t need to translate anything, so to remove you’ll run the command bellow:

Now, feel free from this plugin : )

Mounting USB disks to write live USB

Mounting USB disks to write live USB

Blog Linux

When you are trying to write live USB images of Ubuntu based distros, you’ll need to mount your USB device in a mount point as /media/pendrive/. With tools like UNetBootin you’ll get a message like this:

You must first mount the USB drive /dev/sdb1 to a mountpoint.

So, while you don’t mount your USB device, you cannot proceed with you disk installation. Then, it’s so easy to fix this, you only need do this step before:

Next, mount your device to this folder:

Now, use your prefered tool to write your live USB disk. Here I’m using Unetbootin:

It’s done, now just umount your device and install your unix OS.

If you want know more about advanced mount options, you can access the Help Wiki on link below:

https://help.ubuntu.com/community/Mount/USB

Setup serviio DLNA server on Ubuntu based distros

Setup serviio DLNA server on Ubuntu based distros

Blog Linux

Serviio is a powerful Java media server (DNLA) for Linux, Windows and Mac. After Ubuntu 12, some packages were removed from repositories, such as ffmpeg, that which one is a main dependency os Serviio. So, if you are in distros based on newer versions of Ubuntu (12+), you’ll need to obtain this package from another source, or you can use the steps below.

Add a ffmpeg PPA repository:

After you’ll must update apt’s package list:

Now, install ffmpeg package:

Another required package is dcraw, this one has lots of functions to process and decode images. Some distros have this package, but if you don’t have installed yet, just install it:

To run Serviio just execute your bash file:

And for access GUI:

To inspect Serviio’s logs, you can use tail command:

Enjoy :)

Fixing wrong charset on gedit

Fixing wrong charset on gedit

Blog Linux

If you have problems with charset when you’re editing documents on GEdit, you can fix it changing encoding settings on Gnome environment. For it, use this:

However, you need to check your system locale, on Debian based you can use dpkg-reconfigure for it:

References

http://askubuntu.com/questions/110511/how-to-set-default-encoding-for-non-utf-encoded-documents-system-wide

https://developer.gnome.org/gio/stable/GSettings.html

Como eram feitos os desenhos de antigamente ?

Blog Miscellaneous

Quem nunca se perguntou como eram feitos os desenhos do Mickey, Tom & Jerry, etc., aqueles bem antigos, nunca pensamos no trabalhão que deveria ser, uma vez que ainda não haviam aplicativos para animação, estes tão comuns atualmente.

Então, encontrei este vídeo do próprio Walt Disney explicando o processo de animação dos desenhos do Mickey. Ainda no vídeo ele explica sobre a última palavra em tecnologia, a Multiplane Camera.

Eu fico aqui imaginando que deveriam haver dezenas de pessoas que diariamente ficavam pintando as transparências dos personagens (e suas animações) e outros que operavam as cameras e o processo de animação.

Acho que aí está o motivo destes desenhos terem sidos tão bons.

Why Eclipse is creating classes with ‘_’ on my project ?

Why Eclipse is creating classes with ‘_’ on my project ?

Blog Java

Few days ago I found some classes ended in ‘_’ char, all this classes had the same name of my entity classes. After much wasted time, I finally found the problem, and it’s on Eclipse project configuration.

The JPA support has many options to manage and help your JPA projects, but if you don’t use it, sometimes some configuration can be bigger butt. To solve this, go to Project properties (Alt + Enter), then go to JPA tab, then set Canonical Metamodel to ‘None’, like this:

DeepinScreenshot20140803223000

Now, just remove your ‘_’ classes and rebuild your project.

References

http://stackoverflow.com/questions/1158159/no-persistence-provider-for-entitymanager-named

How to send a broadcast message on Ubuntu-based distros

How to send a broadcast message on Ubuntu-based distros

Blog Linux

Sometimes we need to notify another users connected by SSH in same server with a simple message like when we use ‘halt‘ or ‘init 0‘ commands. Ubuntu-based distros have a special program to it, it’s wall. Then, to send a broadcast message for all connected users in server terminal, you can use:

Now, all of SSH users will receive a message like this: