[this process was accomplished using Ubuntu 12.04 LTS, Tomcat 7 and Eclipse Standard Keplerr 4.3]
Follow this tutorial (from step 1 to 9):
http://gridlab.dimes.unical.it/lackovic/eclipse-tomcat-ubuntu-jersey/
Notes for the above tutorial:
Download and install eclipse manually, from:
http://www.eclipse.org/downloads/packages/eclipse-standard-43/keplerr
Before starting up the tomcat7 server:
sudo mkdir /usr/share/tomcat7/logs
Before shutting down the tomcat7 server:
sudo mkdir /usr/share/tomcat7/conf
sudo cp /etc/tomcat7/server.xml to /usr/share/tomcat7/conf
Before creating a "Dynamic Web Project", run:
cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo chmod -R 777 /usr/share/tomcat7/conf
If you try to add the Tomcat Server v7.0, and the server name doesn't appear:
Close Eclipse
cd ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/
rm org.eclipse.jst.server.tomcat.core.prefs
rm org.eclipse.wst.server.core.prefs
Restart Eclipse
Then, to configure a servlet, follow this tutorial:
http://www.srccodes.com/p/article/3/Tomcat-Hello-World-Servlet-using-Eclipse-IDE
Tuesday, December 24, 2013
Wednesday, December 18, 2013
How to burn / create a dvd video on Ubuntu
[this process was accomplished using Ubuntu 12.04 LTS]
I just used a program, called "Devede". To install:
sudo apt-get install devede
I just used a program, called "Devede". To install:
sudo apt-get install devede
Friday, December 13, 2013
How to install IntelliJ IDEA
[This process was accomplished using Ubuntu 12.04 LTS and IntelliJ IDEA 13]
Install Java:
http://lucastipss.blogspot.com.br/2013/11/how-to-installupdate-java.html
Download Android SDK:
https://developer.android.com/sdk/index.html
To download the Target devices:
"run tools/android, under android_sdk_YOUR_OS, to retrieve the targets, check the option that says “force https to be fetched using http” under settings. And finally, under “Available packages,” select the version of Android you want. ", author.
Download IntelliJ community edition:
http://www.jetbrains.com/idea/download/
Then, extract the folder where you want to be the path to the installation.
Apply the rights to run the executable:
sudo chmod +x [path to the installation]/bin/idea.sh
Do this process to increase the limit
http://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
Done!
To run the IDE, just run:
./[path to the installation]/bin/idea.sh
If you want, you can create an icon through the application Alacarte:
http://lucastipss.blogspot.com.br/2013/11/ubuntu-how-to-add-application-to.html
Install Java:
http://lucastipss.blogspot.com.br/2013/11/how-to-installupdate-java.html
Download Android SDK:
https://developer.android.com/sdk/index.html
To download the Target devices:
"run tools/android, under android_sdk_YOUR_OS, to retrieve the targets, check the option that says “force https to be fetched using http” under settings. And finally, under “Available packages,” select the version of Android you want. ", author.
Download IntelliJ community edition:
http://www.jetbrains.com/idea/download/
Then, extract the folder where you want to be the path to the installation.
Apply the rights to run the executable:
sudo chmod +x [path to the installation]/bin/idea.sh
Do this process to increase the limit
http://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
Done!
To run the IDE, just run:
./[path to the installation]/bin/idea.sh
If you want, you can create an icon through the application Alacarte:
http://lucastipss.blogspot.com.br/2013/11/ubuntu-how-to-add-application-to.html
SubVersion Tips
To checkout a repository (example):
svn co --username [seu_usuario] https://zurbb.codespaces.com/svn/buusapp/android/trunk android2.0
"seu_usuario" = username
"android2.0" = new folder to where the files will be downloaded
svn co --username [seu_usuario] https://zurbb.codespaces.com/svn/buusapp/android/trunk android2.0
"seu_usuario" = username
"android2.0" = new folder to where the files will be downloaded
Thursday, December 12, 2013
Java Default SDK Folder
[this process was accomplished using Ubuntu 12.04 LTS]
The default java jdk folder is:
/usr/local/java
The default java jdk folder is:
/usr/local/java
How to install KeePass
On Ubuntu 16.04 I installed KeePassXC - snap from Software Center
Install snap
https://askubuntu.com/questions/873243/hello-cannot-locate-the-core-snap-no-such-file-or-directory
Install ChromeIPass (didnt manage to make it work)
https://chrome.google.com/webstore/detail/chromeipass/ompiailgknfdndiefoaoiligalphfdae
On Ubuntu 12.04, I don't remenber.
On Ubuntu 14.04, I found the Keepass program on Software Center
Installing keeFox plugin (for firefox)
sudo apt-add-repository ppa:dlech/keepass2-plugins
sudo apt-get update
sudo apt-get install xul-ext-keefox
Then, just reopen KeePass and Firefox
Install snap
https://askubuntu.com/questions/873243/hello-cannot-locate-the-core-snap-no-such-file-or-directory
Install ChromeIPass (didnt manage to make it work)
https://chrome.google.com/webstore/detail/chromeipass/ompiailgknfdndiefoaoiligalphfdae
On Ubuntu 12.04, I don't remenber.
On Ubuntu 14.04, I found the Keepass program on Software Center
Installing keeFox plugin (for firefox)
sudo apt-add-repository ppa:dlech/keepass2-plugins
sudo apt-get update
sudo apt-get install xul-ext-keefox
Then, just reopen KeePass and Firefox
Saturday, November 30, 2013
How to format ubuntu
Tips:
Do NOT use internet during the installation. Update everything later.
My last configurations (during the ubuntu installation):
order - description - size - file system - Mount point
1 - main linux system - 70GB - ext4 - / (root)
2 - other win/linux system - 70GB - don't use the partition -
3 - swap - 10 GB - swap -
4 - efi (this is for the partion table index, or something like) - 1GB - efi -
5 - home - the rest - ext4 - /home
After installing,
http://lucastipss.blogspot.com/2013/11/what-to-do-after-installing-ubuntu.html
Do NOT use internet during the installation. Update everything later.
My last configurations (during the ubuntu installation):
order - description - size - file system - Mount point
1 - main linux system - 70GB - ext4 - / (root)
2 - other win/linux system - 70GB - don't use the partition -
3 - swap - 10 GB - swap -
4 - efi (this is for the partion table index, or something like) - 1GB - efi -
5 - home - the rest - ext4 - /home
After installing,
http://lucastipss.blogspot.com/2013/11/what-to-do-after-installing-ubuntu.html
How to install a video board (MY GPU nVidia GT 630M)
[this process was accomplished on Linux Ubuntu 12.04 LTS]
Just run on terminal:
sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings
Note:
Some time later the installation, an icon on top bar appeared, asking to install additional driver "NVIDIA accelerated graphics driver (post-release updates) (version 319-updates)" DON'T INSTALL THIS!
This was a tutorial extracted from:
http://www.howopensource.com/2012/10/install-nvidia-geforce-driver-in-ubuntu-12-10-12-04-using-ppa/
FOR UBUNTU 14.04 LTS
Install the recommended driver from "additional driver" native support.
Don't forget to set this configurations, for power savings and lower the temperature: https://help.ubuntu.com/community/PowerManagement/ReducedPower
FOR UBUNTU 12.04 LTS
The process above didn't work pretty well. The unity was converted to a 2d old one.
Then, install bumblebee:
https://wiki.ubuntu.com/Bumblebee
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings
FOR UBUNTU 14.04 LTS
Install the recommended driver from "additional driver" native support.
Don't forget to set this configurations, for power savings and lower the temperature: https://help.ubuntu.com/community/PowerManagement/ReducedPower
FOR UBUNTU 12.04 LTS
The process above didn't work pretty well. The unity was converted to a 2d old one.
Then, install bumblebee:
- sudo add-apt-repository ppa:bumblebee/stable
- Enable the Universe and Multiverse repositories (for bumblebee and nvidia packages respectively).
- sudo apt-get update
- Install Bumblebee using the default proprietary nvidia driver for 12.04 - 13.04 : sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic
- And for 13.10 :
sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic - Reboot
https://wiki.ubuntu.com/Bumblebee
What to do after installing ubuntu
Above step not necessary anyone, for ubuntu 14.04 lts.
Install terminator:
sudo apt-get install terminator
Update ctrl+alt+T shortcut:
Search for keyboard, go to tab shortcut. Then create a new shortcut (it will override the default).
Install the GPU:
http://lucastipss.blogspot.com.br/2013/11/how-to-install-my-gpu-nvidia-gt-630m.html
Make the power savings and low temperature configs:
https://help.ubuntu.com/community/PowerManagement/ReducedPower
Configure the two-finger scroll:
Search for "Mouse and Touchpad"
Install Pre load (to speed up the computer using memory pre loads):
sudo apt-get install preload
Install java
http://lucastipss.blogspot.com.br/2013/11/how-to-installupdate-java.html
Install KeePass
http://lucastipss.blogspot.com.br/2013/12/how-to-install-keepass.html
Customize firefox
http://lucastipss.blogspot.ch/2015/07/features-installed-on-firefox.html
Thursday, November 28, 2013
Ubuntu: How to prevent your computer from lock/suspend/hibernate?
[this process was accomplished using Ubuntu 12.04 LTS]
Install this program, called "Caffeine". It prevents the computer from locking/suspending/hibernating by simulating some key pressing events.
TO INSTALL:
On terminal:
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine
Then just run and configure like you want.
Done!
Install this program, called "Caffeine". It prevents the computer from locking/suspending/hibernating by simulating some key pressing events.
TO INSTALL:
On terminal:
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine
Then just run and configure like you want.
Done!
Tuesday, November 26, 2013
How to install/update java
[this process was accomplished using ubuntu 12.04 lts]
[this tutorial is COPIED from www.wikihow.com/Upgrade-Oracle-Java-on-Ubuntu-Linux]
...
[this tutorial is COPIED from www.wikihow.com/Upgrade-Oracle-Java-on-Ubuntu-Linux]
...
Friday, November 22, 2013
Java: Working with Date
The best tutorial I've found:
http://www.blog.edersonlima.net/?p=144
http://www.blog.edersonlima.net/?p=144
How to connect your galaxy (or android +4.0) for mass storage transfer?
[process accomplished on Ubuntu 12.04 LTS and Galaxy S2 with Android 4.0.3]
Just go to (with the USB cable disconnected):
Configurações > Conexões sem fios e redes > Utilitários USB
Click on "Conectar memória ao PC".
Then follow the instructions and voilá.
Done!
With it doesn't resolve the problem, I found other tutorials to try:
http://askubuntu.com/questions/87667/getting-mtp-enabled-devices-to-work-with-ubuntu/308366#308366
http://askubuntu.com/questions/247943/are-there-any-plans-to-improve-mtp-support-on-future-ubuntu-releases
Just go to (with the USB cable disconnected):
Configurações > Conexões sem fios e redes > Utilitários USB
Click on "Conectar memória ao PC".
Then follow the instructions and voilá.
Done!
With it doesn't resolve the problem, I found other tutorials to try:
http://askubuntu.com/questions/87667/getting-mtp-enabled-devices-to-work-with-ubuntu/308366#308366
http://askubuntu.com/questions/247943/are-there-any-plans-to-improve-mtp-support-on-future-ubuntu-releases
Thursday, November 14, 2013
About Eclipse
To automatically indent a code:
Select all the code > ctrl + i
To collapse all the capable blocks:
ctrl + alt + NUM_KEYPAD_DIVIDE
To expand all the collapsed blocks:
ctrl + alt + NUM_KEYPAD_MULTIPLAY
To display the line number:
Preferences > General > Editors > Text Editors
and check "Show line numbers"
To change the color scheme, use this tutorial:
http://eclipsecolorthemes.org/?view=plugin
Select all the code > ctrl + i
To collapse all the capable blocks:
ctrl + alt + NUM_KEYPAD_DIVIDE
To expand all the collapsed blocks:
ctrl + alt + NUM_KEYPAD_MULTIPLAY
To display the line number:
Preferences > General > Editors > Text Editors
and check "Show line numbers"
To change the color scheme, use this tutorial:
http://eclipsecolorthemes.org/?view=plugin
Installing Android Studio
[process accomplished in Ubuntu 12.04 LTS]
To use Android Studio, simply extract the zipped files and execute the file bin/studio.sh
It will be asked for the java jdk.
http://lucastipss.blogspot.com.br/2013/12/java-default-sdk-folder.html
Done!
To use Android Studio, simply extract the zipped files and execute the file bin/studio.sh
It will be asked for the java jdk.
http://lucastipss.blogspot.com.br/2013/12/java-default-sdk-folder.html
Done!
Tuesday, November 12, 2013
Android: How to install and import Library Support v7 to your project
[process accomplished using Ubuntu 12.04 LTS + Eclipse (from ADT Bundle)]
Add the library to your application project:
A picture is worth a thousand words:
You can follow this link too:
http://developer.android.com/tools/support-library/setup.html#download
- Make sure you have downloaded the Android Support Library using the SDK Manager.
- Create a library project and ensure the required JAR files are included in the project's
build path:
- Select File > Import.
- Select Existing Android Code Into Workspace and click Next. (without copying files)
- Browse to the SDK installation directory and then to the Support Library folder.
For example, if you are adding the
appcompat
project, browse to<sdk>/extras/android/support/v7/appcompat/
. - Click Finish to import the project. For the v7 appcompat project, you should now see a new project titled android-support-v7-appcompat.
- In the new library project, expand the
libs/
folder, right-click each.jar
file and select Build Path > Add to Build Path. For example, when creating the the v7 appcompat project, add both theandroid-support-v4.jar
andandroid-support-v7-appcompat.jar
files to the build path. (don't import v4 now. It could be create incompatibilities if your project already imported it). - Right-click the library project folder and select Build Path > Configure Build Path.
- In the Order and Export tab, check the
.jar
files you just added to the build path, so they are available to projects that depend on this library project. For example, theappcompat
project requires you to export both theandroid-support-v4.jar
andandroid-support-v7-appcompat.jar
files.(don't check v4 now. It could be create incompatibilities if your project already did it). - Uncheck Android Dependencies.
- Click OK to complete the changes.
Add the library to your application project:
- In the Project Explorer, right-click your project and select Properties.
- In the category panel on the left side of the dialog, select Android.
- In the Library pane, click the Add button.
- Select the library project and click OK. For example, the
appcompat
project should be listed as android-support-v7-appcompat. - In the properties window, click OK.
A picture is worth a thousand words:
You can follow this link too:
http://developer.android.com/tools/support-library/setup.html#download
Friday, November 8, 2013
How to customize NetBeans?
[this process was accomplished on Netbeans 7.3.1]
You can download a theme on internet, at sites like this.
The last one I used was Icarus.
And before that, was sublime style.
To install, just go to tools > options and click on "Import", at the botton.
To alter the font size, tools > options > Fonts & Colors > Font, and choose your preference.
You can download a theme on internet, at sites like this.
The last one I used was Icarus.
And before that, was sublime style.
To install, just go to tools > options and click on "Import", at the botton.
To alter the font size, tools > options > Fonts & Colors > Font, and choose your preference.
Wednesday, November 6, 2013
Ubuntu: How to add an application icon to the launcher?
[this process was accomplished using Ubuntu 12.04 LTS]
Install the program alacarte (it's currently name is "Main Menu"):
sudo apt-get install alacarte
Then, just open it and add a new item to the category you want.
Done!
You could also do this process adding a .desktop file manually. To do that, follow this link:
http://askubuntu.com/questions/224004/how-to-add-programs-to-the-launcher
Install the program alacarte (it's currently name is "Main Menu"):
sudo apt-get install alacarte
Then, just open it and add a new item to the category you want.
Done!
You could also do this process adding a .desktop file manually. To do that, follow this link:
http://askubuntu.com/questions/224004/how-to-add-programs-to-the-launcher
Monday, November 4, 2013
How to install SDL?
[This process was accomplished using Ubuntu 12.04 LTS + NetBeans 7.3.1]
First, you need to install the sdl library. Just go through the terminal:
sudo aptitude install libsdl1.2-dev
For others OS, look at here:
http://lazyfoo.net/SDL_tutorials/lesson01/index.php
To set up on Netbeans:
On the project you want to use it, go to "Project Properties -> Build -> Linker -> Libraries -> Add Option -> Other option ", and enter:
-lSDL
More on:
http://forums.netbeans.org/topic41614.html
http://forums.netbeans.org/post-29474.html
For other IDEs, look at here:
http://lazyfoo.net/SDL_tutorials/lesson01/linux/index.php
To test if it worked, run the following code:
#include "SDL/SDL.h"
int main( int argc, char* args[] ) {
SDL_Init( SDL_INIT_EVERYTHING ); //Start SDL
SDL_Quit(); //Quit SDL
return 0;
}
Installing SDL Extensions:
to load images of various extensions
sudo aptitude install libsdl-image1.2-dev
to work with fonts
sudo aptitude install libsdl-ttf2.0-dev
to work with 16-bit sounds
sudo aptitude install libsdl-mixer1.2-dev
For other OS:
http://lazyfoo.net/SDL_tutorials/lesson03/index.php
Set up on Netbeans:
On the project you want to use it, go to "Project Properties -> Build -> Linker -> Libraries -> Add Option -> Other option ", and enter:
-lSDL_image
-lSDL_ttf
-lSDL_mixer
You need to add the header files to the project:
#include "SDL/SDL_image.h"
#include "SDL/SDL_ttf.h"
#include "SDL/SDL_mixer.h"
Done!
First, you need to install the sdl library. Just go through the terminal:
sudo aptitude install libsdl1.2-dev
For others OS, look at here:
http://lazyfoo.net/SDL_tutorials/lesson01/index.php
To set up on Netbeans:
On the project you want to use it, go to "Project Properties -> Build -> Linker -> Libraries -> Add Option -> Other option ", and enter:
-lSDL
More on:
http://forums.netbeans.org/topic41614.html
http://forums.netbeans.org/post-29474.html
For other IDEs, look at here:
http://lazyfoo.net/SDL_tutorials/lesson01/linux/index.php
To test if it worked, run the following code:
#include "SDL/SDL.h"
int main( int argc, char* args[] ) {
SDL_Init( SDL_INIT_EVERYTHING ); //Start SDL
SDL_Quit(); //Quit SDL
return 0;
}
Installing SDL Extensions:
to load images of various extensions
sudo aptitude install libsdl-image1.2-dev
to work with fonts
sudo aptitude install libsdl-ttf2.0-dev
to work with 16-bit sounds
sudo aptitude install libsdl-mixer1.2-dev
For other OS:
http://lazyfoo.net/SDL_tutorials/lesson03/index.php
Set up on Netbeans:
On the project you want to use it, go to "Project Properties -> Build -> Linker -> Libraries -> Add Option -> Other option ", and enter:
-lSDL_image
-lSDL_ttf
-lSDL_mixer
You need to add the header files to the project:
#include "SDL/SDL_image.h"
#include "SDL/SDL_ttf.h"
#include "SDL/SDL_mixer.h"
Done!
Friday, October 25, 2013
How to install the SBVBLib?
[this process was accomplished on Ubuntu 12.04 LTS using Netbeans IDE 7.3.1 C/C++]
Download the VBLib:
[link]
Extract it wherever you want.
Then, on your Eclipse IDE:
right click on your project > properties > Build > C++ Compiler > Include Directories.
Add the path to the library. Mine was:
../sbvblibs-h/include
Ok, we're finished!
Now you can include the lib to your project, like this:
#include "VBLib/VBLib.h"
And namespacing:
using namespace br::com::sbVB::VBLib;
More information about header only libraries:
http://stackoverflow.com/questions/14287817/how-do-you-add-libraries-to-eclipse-cdt-no-such-file-or-directory
Download the VBLib:
[link]
Extract it wherever you want.
Then, on your Eclipse IDE:
right click on your project > properties > Build > C++ Compiler > Include Directories.
Add the path to the library. Mine was:
../sbvblibs-h/include
Ok, we're finished!
Now you can include the lib to your project, like this:
#include "VBLib/VBLib.h"
And namespacing:
using namespace br::com::sbVB::VBLib;
More information about header only libraries:
http://stackoverflow.com/questions/14287817/how-do-you-add-libraries-to-eclipse-cdt-no-such-file-or-directory
How to install QT Digia?
[tested on Ubuntu 12.04 LTS. But should work for many other platforms]
The easiest way, witch I used, was to go through the online instalation:
http://qt.digia.com/Try-Qt-Now/
Download the online installer on the above link, and run it.
It has a dependency that I had to install too:
sudo apt-get install libgl1-mesa-dev
If you difficulties on executing .run file, see:
http://lucastipss.blogspot.com.br/2013/10/ubuntu-how-to-runexecute-run-files.html
The easiest way, witch I used, was to go through the online instalation:
http://qt.digia.com/Try-Qt-Now/
Download the online installer on the above link, and run it.
It has a dependency that I had to install too:
sudo apt-get install libgl1-mesa-dev
If you difficulties on executing .run file, see:
http://lucastipss.blogspot.com.br/2013/10/ubuntu-how-to-runexecute-run-files.html
Thursday, October 24, 2013
Android Development: How to make a custom ListView item
Tutorial to make the view (without buttons and functions):
http://hmkcode.com/android-custom-listview-items-row/
http://hmkcode.com/android-custom-listview-items-row/
Android Development: To change the titlebar background color
Notes:
the color setted was light gray
For <api 11, the attribute changed was windowTitleBackgroundStyle
For >api 11, actionBarStyle
Add to the application tag, on AndroidManifest.xml:
android:theme="@style/ThemeSelector"
On values/styles.xml, it was added:
<style name="ThemeSelector" parent="android:Theme.Light">
<item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item>
</style>
<style name="WindowTitleBackground">
<item name="android:background">#E0E0E0</item>
</style>
On values-v11/styles.xml, add:
<style name="ThemeSelector" parent="android:Theme.Holo.Light">
<item name="android:actionBarStyle">@style/ActionBar</item>
</style>
<style name="ActionBar" parent="android:style/Widget.Holo.ActionBar">
<item name="android:background">#E0E0E0</item>
</style>
the color setted was light gray
For <api 11, the attribute changed was windowTitleBackgroundStyle
For >api 11, actionBarStyle
Add to the application tag, on AndroidManifest.xml:
android:theme="@style/ThemeSelector"
On values/styles.xml, it was added:
<style name="ThemeSelector" parent="android:Theme.Light">
<item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item>
</style>
<style name="WindowTitleBackground">
<item name="android:background">#E0E0E0</item>
</style>
On values-v11/styles.xml, add:
<style name="ThemeSelector" parent="android:Theme.Holo.Light">
<item name="android:actionBarStyle">@style/ActionBar</item>
</style>
<style name="ActionBar" parent="android:style/Widget.Holo.ActionBar">
<item name="android:background">#E0E0E0</item>
</style>
Tuesday, October 22, 2013
Git + GitHub Commands
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin [url
git push -u origin master
git clean -fd # removes all unstaged files, recursivel
git reset --hard [HEAD hash] # To reset the files to a commit point:
git clone [url]
git status #see what files have been modified
git add files.txt #add the file.txt to the next commit
git log # use ctrl+z to finish
git add -u # to stage deleted files from the whole tree [more info: http://stackoverflow.com/questions/1402776/how-do-i-commit-all-deleted-files-in-git
Other resets:
http://stackoverflow.com/questions/4114095/revert-to-previous-git-commit
git push
git pull
git reflog
git rm --chached file.txt #basic, the opposite of git add
file ".gitignore" #list in there all the files to be ignored
git init
git add README.md
git commit -m "first commit"
git remote add origin [url
git push -u origin master
git clean -fd # removes all unstaged files, recursivel
git reset --hard [HEAD hash] # To reset the files to a commit point:
git clone [url]
git status #see what files have been modified
git add files.txt #add the file.txt to the next commit
git log # use ctrl+z to finish
git add -u # to stage deleted files from the whole tree [more info: http://stackoverflow.com/questions/1402776/how-do-i-commit-all-deleted-files-in-git
Other resets:
http://stackoverflow.com/questions/4114095/revert-to-previous-git-commit
git push
git pull
git reflog
git rm --chached file.txt #basic, the opposite of git add
file ".gitignore" #list in there all the files to be ignored
Tuesday, October 15, 2013
Ubuntu: tips on taking ScreenShots
To take an entire desktop screenshot:
simply press the "print screen" button
To take a print screen of a specific window || selected are:
Search for a program called "ScreenShot" or "Take ScreenShot".
To take a screenshot (with the above features) and automatically open into GIMP:
On the GIMP menu, go to File>Create>ScreenShot
simply press the "print screen" button
To take a print screen of a specific window || selected are:
Search for a program called "ScreenShot" or "Take ScreenShot".
To take a screenshot (with the above features) and automatically open into GIMP:
On the GIMP menu, go to File>Create>ScreenShot
Tuesday, October 8, 2013
Tips on VirtualBox
v.m. = "Virtual Machine"
To scale your v.m. to fullscrenn:
Go to the title bar menu on the v.m. View>choose your prefered option. Or use the shortcuts Host (generly right ctrl [there is a popup, when you inicialize the v.m., that tells you that]) + c || Host + f
To install a Shared Folder:
Turn the v.m. off. On the main menu, go to Settings>Shared Folder and set up the folder. Then, turn your v.m. on. Go to the title menu bar, Devices>Install Guest Addition. Then go to the CD/DVD driver (on the v.m.), run the wizard and install it. Done!
To scale your v.m. to fullscrenn:
Go to the title bar menu on the v.m. View>choose your prefered option. Or use the shortcuts Host (generly right ctrl [there is a popup, when you inicialize the v.m., that tells you that]) + c || Host + f
To install a Shared Folder:
Turn the v.m. off. On the main menu, go to Settings>Shared Folder and set up the folder. Then, turn your v.m. on. Go to the title menu bar, Devices>Install Guest Addition. Then go to the CD/DVD driver (on the v.m.), run the wizard and install it. Done!
Thursday, October 3, 2013
How to download an entire youtube playlist on Linux Ubuntu
First you have to install the youtube-dl (stands for youtube download):
sudo apt-get install youtube-dl
If you already have it installed, make sure it is updated:
sudo youtube-dl -U
Ok, to download the youtube playlist simply enter:
youtube-dl -cit <the youtube playlist link, between quotation marks>
To understand what "c", "i" and "t" do, enter:
youtube-dl --help
sudo apt-get install youtube-dl
If you already have it installed, make sure it is updated:
sudo youtube-dl -U
Ok, to download the youtube playlist simply enter:
youtube-dl -cit <the youtube playlist link, between quotation marks>
To understand what "c", "i" and "t" do, enter:
youtube-dl --help
Monday, September 30, 2013
Useful terminal commands on linux
To remove a folder and inside files (recursivelly), use:
rm -r <name of directory>
rm -r <name of directory>
Sunday, September 29, 2013
Handle Tips About Ubuntu
Where to find the list of default applications per file type:
~/.local/share/applications/mimeapps.list
Where to find the executables of all the programs:
/usr/bin
Where to find the .desktops of all the programs:
/usr/share/applications
~/.local/share/applications/mimeapps.list
Where to find the executables of all the programs:
/usr/bin
Where to find the .desktops of all the programs:
/usr/share/applications
Saturday, September 28, 2013
Tips to configure the wireless router
On the wireless router,
Look for MTU. Using Velox (Oi), the PPPoE default value is 1492, and PPPoA is 1500.
Then, look for Beacon Interval, and set it to the minium value. Repeat it for DTIM.
Ok, it's this! :)
Look for MTU. Using Velox (Oi), the PPPoE default value is 1492, and PPPoA is 1500.
Then, look for Beacon Interval, and set it to the minium value. Repeat it for DTIM.
Ok, it's this! :)
Thursday, September 26, 2013
Using g++
To compile (and link) a .cpp file:
g++ -o <executable file name> <.cpp file name>
To run the binary file, enter:
./<executable file name>
g++ -o <executable file name> <.cpp file name>
To run the binary file, enter:
./<executable file name>
Saturday, September 14, 2013
Como melhorar sua conexao wireless no Ubuntu?
Olá, esta é uma dica para quem está com problemas de lentidão, desconexão frequente e afins no Ubuntu lts 12.04.
Basicamente esta dica se refere ao Network-Manager, o gerenciador de rede padrão do ubuntu. Na sua versão atual (hoje é 14/09/2014, infelizmente não encontrei o código da versão no repositório apt-get), disponível, foram encontrados bugs que resultam no seu péssimo desempenho.
Basicamente esta dica se refere ao Network-Manager, o gerenciador de rede padrão do ubuntu. Na sua versão atual (hoje é 14/09/2014, infelizmente não encontrei o código da versão no repositório apt-get), disponível, foram encontrados bugs que resultam no seu péssimo desempenho.
Subscribe to:
Posts (Atom)