Pages

Showing posts with label tips and tricks. Show all posts
Showing posts with label tips and tricks. Show all posts

Saturday, July 3, 2021

Fedora 34 : Can be better? part 018.

Fedora distro can improuve the LXDE environment.
Let's start this simple tips and tricks that change the size of the window.
You can see the window is blocked by the Task Bar.
You need to open this file named lxde-rc.xml:
[mythcat@desk ~]$ vim ~/.config/openbox/lxde-rc.xml 
Then change these lines of source code save the file and reboot:
<!-- You can reserve a portion of your screen where windows will not cover when they are
 maximized, or when they are initially placed. 
Many programs reserve space automatically, but you can use this in other cases. -->
<margins>
 <top>0</top>
 <bottom>30</bottom>
 <left>0</left>
 <right>0</right>
</margins>
After reboot the result is more good:

Monday, June 27, 2016

Shortcuts - online tool help.

This website comes with one of the incredible numbers of shortcuts.
You can see below the icons for each application.
So when you have time, just take a look ...

Wednesday, July 31, 2013

Google Analytics - new settings to improve your website.

Now Google Analytics team help you turn your website’s data to improve results and meet your goals.

You can share your information websites with google experts and will receive account tips, new ideas and goals.

Read this tutorial about how to do that.

Thursday, July 25, 2013

Using cat command to see all source code from one folder.

You can see all content of your files using cat command.

I created one function named catt in my .bashrc file.

This is the function you can change to show any type of files not just javascript.

That allow you to working in same folder with many files and see the changes.

If you have another idea about how to see changes in all source of code then just send me one mail or comment.

function catt(){
    for i in *.js;
        do echo "__""$i""__";
        echo "--------------------------";
        cat "$i" -n -b;
        echo "--------------------------";
        done ;
}

And this is result output for all javascript from my node.js folder.

--------------------------
__serv.js__
--------------------------
     1 var sys = require("sys"),
     2 my_http = require("http");
     3 my_http.createServer(function(request,response){
     4  sys.puts("I got kicked");
     5  response.writeHeader(200, {"Content-Type": "text/plain"});
     6  response.write("Hello World");
     7  response.end();
     8 }).listen(8080);
     9 sys.puts("Server Running on 8080");
--------------------------
__test.js__
--------------------------
     1 var sys = require("sys");
     2 sys.puts("Hello World");
--------------------------

One problem can be the number of files parse by this function.

In this case you will not able to see all content of files. Will be to much for you.

But for settings files will work great.

Sunday, June 30, 2013

Using .bashrc function to connect and debug your android application.

This is a simple way to use your tablet device to debug your android applications.

Go to root account and open the .bashrc file.

Type the next source code using your home folder account.

function tablet()
{
cd /home/free-tutorials/android-studio/sdk/platform-tools/
./adb kill-server
./adb server
./adb devices
}

Restart your terminal, connect your tablet device .

Now you can use this command : tablet to start connection with your tablet.

If you want to see more about programming android application under Fedora distro , just go to this website.

Thursday, May 2, 2013

Testing upload images on google account.

When you upload many images under your google account the time is longer and refresing of upload gui is slow.

You can test your user interface to see how MiB is uploading to google server.

See the next linux command.

$ watch -d 'ifconfig | grep MiB | grep "TX bytes"'

And result is something like this:

Every 2.0s: ifconfig | grep MiB | grep "TX bytes" Thu May  2 22:44:09 2013

          RX bytes:15625675 (14.9 MiB)  TX bytes:184506104 (175.9 MiB)

Wednesday, December 26, 2012

News: Tips and tricks: recursive show images

The "Mastering OpenCV with Practical Computer Vision Projects" book is done and published!
Also: including a screenshot of each project...
This will be the main issue.
... to see the screenshot from each project
...and also to find a way for any file to use
Let's take the book and source code:
$ git clone git://github.com/MasteringOpenCV/code.git
Go to the main folder: $ cd code and use this:
code]$ ls 
Chapter1_AndroidCartoonifier     Chapter7_HeadPoseEstimation
Chapter2_iPhoneAR                Chapter8_FaceRecognition
Chapter3_MarkerlessAR            Chapter9_FluidInteractionUsingKinect
Chapter4_StructureFromMotion     LICENSE.txt
Chapter5_NumberPlateRecognition  README.md
Chapter6_NonRigidFaceTracking
If we use the tree Linux command the result will be:
.
|-- Chapter1_AndroidCartoonifier
|   |-- Cartoonifier_Android
|   |   |-- AndroidManifest.xml
|   |   |-- jni
|   |   |   |-- Android.mk
|   |   |   |-- Application.mk
|   |   |   `-- jni_part.cpp
|   |   |-- project.properties
|   |   |-- res
|   |   |   |-- drawable
|   |   |   |   `-- icon.png
|   |   |   `-- values
|   |   |       `-- strings.xml
|   |   `-- src
|   |       `-- com
|   |           `-- Cartoonifier
|   |               |-- CartoonifierApp.java
|   |               |-- CartoonifierView.java
|   |               `-- CartoonifierViewBase.java
|   |-- Cartoonifier_Desktop
|   |   |-- CMakeLists.txt
|   |   |-- ImageUtils.h
|   |   |-- ImageUtils_0.7.cpp
|   |   |-- cartoon.cpp
|   |   |-- cartoon.h
|   |   `-- main_desktop.cpp
|   |-- README.txt
|   `-- screenshot.png
|-- Chapter2_iPhoneAR
We need something to find the absolute path and give that to gthumb to run it.
First, find the screenshot:
 code]$ ls -d  $PWD/**/*.png
/home/free-tutorials/code/Chapter1_AndroidCartoonifier/screenshot.png
/home/free-tutorials/code/Chapter2_iPhoneAR/screenshot.png
/home/free-tutorials/code/Chapter3_MarkerlessAR/screenshot.png
/home/free-tutorials/code/Chapter4_StructureFromMotion/screenshot.png
/home/free-tutorials/code/Chapter5_NumberPlateRecognition/screenshot.png
/home/free-tutorials/code/Chapter6_NonRigidFaceTracking/screenshot.png
/home/free-tutorials/code/Chapter7_HeadPoseEstimation/screenshot.png
/home/free-tutorials/code/Chapter8_FaceRecognition/screenshot.png
/home/free-tutorials/code/Chapter9_FluidInteractionUsingKinect/screenshot.png
Now will run gthumb with all these images:
code]$ ls -d  $PWD/**/*.png | xargs gthumb 

Sunday, September 2, 2012

News: Tips and tricks: watch and cat.

Sometimes it is necessary to find solutions.
Today's example involves two Linux commands:
watch and cat
Here is a simple method by creating a script that returns an output:
while [ 1 ]; do cat /proc/meminfo; date; echo; sleep 1; done
Make this script executable and name it: meminfo.
The output is then processed by the command:
$ watch -d ./meminfo 
This simple method can be applied to other files ...