Ετήσια αρχεία: 2013


GMail – View with no labs enabled

To view your gmail account with all labs disabled, simply visit the following link:

http://mail.google.com/mail/?labs=0

Advertisements

Remove the last character from a bash variable

The following method, removes the last character from a bash variable by using a regular expression that matches any character.

VAR=${VAR%?};

The functionality ${string%substring} deletes shortest match of $substring from the back of $string.
The question mark ? matches zero or one of the previous regular expression. It is generally used for matching single characters.
So by using ? as our $substring we instruct bash to match any character at the end of the variable and remove it.

Example

$ VAR="Banana";
$ VAR=${VAR%?};
$ echo $VAR;
Banan


Remove the first character from a bash variable

The following method, removes the first character from a bash variable by using a regular expression that matches any character.

VAR=${VAR#?};

The functionality ${string#substring} deletes shortest match of $substring from the front of $string.
The question mark ? matches zero or one of the previous regular expression. It is generally used for matching single characters.
So by using ? as our $substring we instruct bash to match any character at the beginning of the variable and remove it.

Example

$ VAR="Banana";
$ VAR=${VAR#?};
$ echo $VAR;
anana


How to convert ppsx and pps to ppt/pptx/pdf with Microsoft Office 1

Methodologies:

Method A) You can right click on the ppsx/pps file and then click New, this will open a new presentation in PowerPoint with the contents of the ppsx/pps show.
Following, you can modify the document and save it to the desired format.

Method B) You can start the PowerPoint application, go to the File menu and then select Open from the menu on the right, navigate to your ppsx/pps file and open it. After you make your modifications save it to the desired format.

Video Examples

This video demonstrates how to convert a PPSx (PowerPoint show) file to a PDF.

The following video demonstrates how to open a ppsx and a pps file using PowerPoint in a way that you will be able to edit them.


WordPress Network – Jetpack Stats Problem

In case you receive a similar error to this:
Fatal error: Call to undefined function get_editable_roles() in ~/public_html/example.com/wp-content/plugins/jetpack/modules/stats.php on line 219
Just visit the dashboard of your website (http://example.com/wp-admin/).
It will make the necessary calls to the Jetpack plugin and fix this error (this error is an initialization error).


How to install icecat on gnewsense 2.3

I tried installing icecat-17.0.1 on gnewsense 2.3 Delta-H following the instructions found here: http://www.gnewsense.org/Documentation/IceCat.

At the make step I got the following error:
c++ -o MediaManager.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include ../../config/gcc_hidden.h -D_IMPL_NS_LAYOUT -DMOZ_GLUE_IN_PROGRAM -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES -DSTATIC_EXPORTABLE_JS_API -I../../dom/base -I../../dom/battery -I../../dom/file -I../../dom/power -I../../dom/media -I../../dom/network/src -I../../dom/settings -I../../dom/sms/src -I../../dom/contacts -I../../dom/alarm -I../../dom/src/events -I../../dom/src/storage -I../../dom/src/offline -I../../dom/src/geolocation -I../../dom/src/notification -I../../dom/workers -I../../content/xbl/src -I../../content/xul/document/src -I../../content/events/src -I../../content/base/src -I../../content/html/content/src -I../../content/html/document/src -I../../content/svg/content/src -I../../layout/generic -I../../layout/style -I../../layout/xul/base/src -I../../layout/xul/base/src/tree/src -I../../dom/camera -I../../media/webrtc/trunk/src -I../../dom/media -I. -I../../dist/include -I~/icecat-17.0.1/dist/include/nspr -I~/icecat-17.0.1/dist/include/nss -fPIC -pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -Wno-long-long -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -g -pipe -O3 -fomit-frame-pointer -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/MediaManager.o.pp ~/icecat-17.0.1/dom/media/MediaManager.cpp
In file included from ../../dom/base/nsGlobalWindow.h:61,
from ~/icecat-17.0.1/dom/media/MediaManager.h:9,
from ~/icecat-17.0.1/dom/media/MediaManager.cpp:5:
../../content/base/src/nsFrameMessageManager.h:278:7: warning: no newline at end of file
In file included from ../../media/webrtc/trunk/src/voice_engine/main/interface/voe_base.h:38,
from ../../dist/include/MediaEngineWebRTC.h:31,
from ~/icecat-17.0.1/dom/media/MediaManager.cpp:19:
../../media/webrtc/trunk/src/common_types.h:350: error: comma at end of enumerator list
../../media/webrtc/trunk/src/common_types.h:375: error: comma at end of enumerator list
../../media/webrtc/trunk/src/common_types.h:424: error: comma at end of enumerator list
../../media/webrtc/trunk/src/common_types.h:436: error: comma at end of enumerator list
../../media/webrtc/trunk/src/common_types.h:450: error: comma at end of enumerator list
make[4]: *** [MediaManager.o] Error 1

The fix is really simple! 🙂

Just open the file icecat-17.0.1/media/webrtc/trunk/src/common_types.h in an editor, got to the lines mentioned in the error and remove the commas on the last items of the enumerator list.

Example:

Lines 342-351
enum NsModes // type of Noise Suppression
{
kNsUnchanged = 0, // previously set mode
kNsDefault, // platform default
kNsConference, // conferencing default
kNsLowSuppression, // lowest suppression
kNsModerateSuppression,
kNsHighSuppression,
kNsVeryHighSuppression, // highest suppression
};
must become

enum NsModes // type of Noise Suppression
{
kNsUnchanged = 0, // previously set mode
kNsDefault, // platform default
kNsConference, // conferencing default
kNsLowSuppression, // lowest suppression
kNsModerateSuppression,
kNsHighSuppression,
kNsVeryHighSuppression // highest suppression
};


to view «like me» posts

About those annoying websites that will not allow you to view their content unless you click «like» on every article they have. Like me, you might not want to do that, because you might find out later that they do not really have the information you need, yet you already shared it.

A guide to avoid this situation (for a few sites at least, do the following for FireFox:

  1. view the source code (Ctrl+U)  of the page
  2. find something like $(‘#hide-me’).show();
  3. Type ctrl+shift+k and paste it there, then press enter
  4. Voila!

I hope it helps 🙂