Oct 09 2015

Just dev things

Category: TechnicalIuliana @ 16:46

After receiving an email from MyEclipse that begged me to renew my license, I got a little creative. Click on each image in order to enlarge it.
small_eclipse small-love-intellij

Julie pic source

Aug 26 2014

Setting up a PPPOE connection in Fedora 20

Category: TechnicalIuliana @ 11:21

I just moved to a new city and yesterday an internet provider representative came to visit to set up my internet access. Until singing with this provider I was never concerned with the type of internet connection I had. Also, always being behind a server/router made sure I would never bothered with this. But I remember my friends which had internet from the same ISP, they had to set up on Windows something called an PPPOE connection and an username and password was required.

I did not realized that I will be needing that type of connection too until the ISP representative was here the previous evening, so while he was finishing the papers I searched on my mobile how to do that on Fedora. Apparently it is quite easy but there are a few catches, so even if you find the instructions easily on Google I will be writing about it here, just in case anybody else needs to know this. (This will be most useful for Linux Romanian beginners which want to sign up with the RDS ISP and have dynamic IPs)

The command to set up a PPPOE connection is pppoe-setup. To use it you need to be root. So open a terminal and log in with the root user. Then execute that command and step by step you will be requested the following:

  • Login name: [insert the username provided by your ISP]
  • Interface: [insert here the name associated to your network adapter, usually it is eth0 so you can go ahead and just press <Enter> to use the default, but in some cases like mine, you have to open another terminal and check your network adapter name using the ifconfig command – in my case the network adapter is called p2p1]
  • Demand activate the link: you will see some text explaining the options you have, the paragraph starts with “Do you want the link to come up on demand, or stay up continuously?” and the default option is for this link is not to be activated on demand. In case of a  dynamic IP you would preffer for your link to stay up permanently, so you will insert  no.
  • IP address of your ISP’s primary DNS server: [this is the tricky one, most people just hti <Enter> and go with default, but in case of a dynamic IP which will be provided by a server so the option you need so insert is server ]
  • Password: [insert here the password provided by your ISP, you will be asked to introduce it twice]
  • USERCTRL:[insert yes, to give access to the normal user to use the connection]
  • FIREWALLING:[you have three options here, but you have Linux and a dynamic IP so you do not need a firewall –  insert 0]

The very best thing about the pppoe-setup is that every option you have comes up with a complete explanation on what it means, so all you need to know basically is the name of that command, everythign else you can read while setting up the configuration. After inserting all necessary data, you will be told how to start, stop or view the status of your connection

Congratulations, it should be all set up!

Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0'
to bring it down.
Type '/sbin/pppoe-status /etc/sysconfig/network-scripts/ifcfg-ppp0'
to see the link status.

So just do that, execute /sbin/ifup ppp0 and indeed you should be all set up. If you encounter problems, please let me know via comments, I am am always eager to learn new things and I love challenges. :)

Tags: , ,

Feb 09 2014

What java and vlc do to your computer when ran together

Category: TechnicalIuliana @ 11:25


Results from cat /proc/cpuinfo:
4 x

vendor_id	: GenuineIntel
cpu family	: 6
model		: 37
model name	: Intel(R) Core(TM) i5 CPU       M 480  @ 2.67GHz
stepping	: 5
microcode	: 0x4
cpu MHz		: 2667.000
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 2
cpu cores	: 2
apicid		: 5
initial apicid	: 5
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr
 sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc
 aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm ida arat
 dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5321.30
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual

Results from cat /proc/meminfo

MemTotal:        5973056 kB
MemFree:          287364 kB
Buffers:          283604 kB
Cached:          1446940 kB
SwapCached:        43652 kB
Active:          3517056 kB
Inactive:        1668528 kB
Active(anon):    2678664 kB
Inactive(anon):   841940 kB
Active(file):     838392 kB
Inactive(file):   826588 kB
Unevictable:          28 kB
Mlocked:              28 kB
SwapTotal:       8191996 kB
SwapFree:        7899416 kB
Dirty:               132 kB
Writeback:             0 kB
AnonPages:       3424548 kB
Mapped:           194148 kB
Shmem:             65564 kB
Slab:             247620 kB
SReclaimable:     210876 kB
SUnreclaim:        36744 kB
KernelStack:        4968 kB
PageTables:        52676 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    11178524 kB
Committed_AS:    7064468 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      365944 kB
VmallocChunk:   34359318848 kB
HardwareCorrupted:     0 kB
AnonHugePages:   1083392 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      566520 kB
DirectMap2M:     5584896 kB

Yeah … I need a new workstation, because the current one is definetly deprecated.

Sep 18 2013

The repetitive programmer

Category: TechnicalIuliana @ 12:36

You know who you are. I know who you are. And I hate you. And I despise you. Every time I have to  work with your code my brain keeps screaming WHY? WHY?WHYYYYYYY?  and I begin to think you are retarded. Or maybe just not retarded, but maybe you learned to program on another planet, because no programmer from this Earth, not even a mediocre one would write code like you do and also be paid for it. I would not pay you for it, I would send you do dig holes or clean shit pipes or something that does not imply any brain power whatsoever. Because you have none!


// [bla bla  bla - code that I won't put here]
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
	Document document = new Document(PageSize.A4);
	PdfWriter writer = PdfWriter.getInstance(document, bos);
        // [bla bla  bla - code that I won't put here]
	if (document != null) {
	if (writer != null) {
        // [bla bla  bla - code that I won't put here]
        OutputStream outputStream = new FileOutputStream(attachmentURL);
        // You might notice that the outputStream was not closed
} catch (MailException e) {
        if (log.isWarnEnabled()) {
                log.warn("Cannot send email for something " + something.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;
} catch (MessagingException e) {
	if (log.isWarnEnabled()) {
		log.warn("Cannot send email of something " + something.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;
} catch (IllegalArgumentException e) {
	if (log.isWarnEnabled()) {
		log.warn("Cannot send email ofsomething " + expressOrder.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;
} catch (MalformedURLException e) {
	if (log.isWarnEnabled()) {
		log.warn("Cannot send email of express order " + something.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;
} catch (IOException e) {
	if (log.isWarnEnabled()) {
		log.warn("Cannot send email of something " + something.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;
} catch (DocumentException e) {
	if (log.isWarnEnabled()) {
		log.warn("Cannot send email of something " + something.getId(), e);
	sendAdminMessage("Error sending email message to user", "Cannot send email for something nr "
			+ something.getId() + ". Message is = " + e.getMessage());
			return false;

So, 7 catch-es, for seven types of exceptions, we do the same thing for every type of exception, write the same code, because it looks good in the SVN if somebody looks, he will see that you wrote a lot of code. A lot of crap more like it. And why the hell do you not make sure all your streams are closed??
The person who wrote this code is payed a few thousand euros to write code like this. Yeah, I guess the recruitment department sucked ass when this person was hired.

So yeah, if you write code like this, quit programming now and look for another job. You clearly are not made for this and you are a despicable person.

Tags: ,

May 21 2013

Office war

Category: English posts,Funny,TechnicalIuliana @ 15:15

So… sometime in December I was assigned to a new project. The project was new for me, in fact it is about 6 years old, a few outsourcing teams worked on it and now me and my colleagues started working with the last team to … make it better. So these guys are sometimes doing rookie mistakes, and apparently nothing can convince them that it is not ok to break the build or commit sources that don’t compile and other small stuff like that.

So every time one of them does something that is shouldn’t I search for a Ryan Gosling picture on this site and sent the link on the main chat with a special dedication. But sometimes, the pictures available on the site are not enough. So these are my two creations for my colleagues, for now. But I intend to keep you updated. :)

May 08 2013

Intrebarea zilei la eMag

Category: Funny,Technicalhartz @ 14:50

Am fost si eu ca omul la eMag sa iau una, alta si in timp ce imi dadea tipul de acolo produsele alt tip isi cumparase un router si discuta cu tipul de la garantie.  Intreba cum se face, cum se instaleaza, daca are tot ce ii trebuie in limba romana (parea un tip de max 30 ani) dupa care vine intrebarea de 3122 puncte:

“Ca sa am semnal in casa, trebuie sa tin calculatorul pornit?”

Apr 13 2013

Linux: connect to VPN (complete)

Category: English posts,TechnicalIuliana @ 22:53

Some time ago at work, I was assigned to a new project. To be able to access client specific resources I needed to be able to connect to a VPN. I was given a domain, username, password and a gateway. All was simple in Windows and all resources were accessible. Among these resources there were some servers (testing, acceptance, stuff like that)  which had the application installed and were accessed through the browser via http. (Example: http://server1:8080/application). But when my request to work on Linux was approved, and I received a fresh Linux workstation to configure as I please, I stumbled across a few problems, because any tutorial on the internet  that explains to you how to set up a VPN connection in Linux is incomplete. So, what did I do?

The first step was to  get all the information from Windows that I could. So I clicked right on the VPN connection and made print-screens of all the properties  shown. Then I logged on to my Linux (Fedora 18 at work, Ubuntu 12.10 at home – I am mentioning this because the steps are identical) and proceeded to create my VPN connection according to the steps here, but always taking a look at the print-screens I took in Windows.  Just to make sure, I also asked my colleague who gave me the VPN details in the first place what type of VPN was it and he said:  “ it’s standard Windows VPN, PPTP. Port 1723″

So the steps I took were:

  1. Click right on Network Connections icon , select  VPN Connections, then click on Configure VPN
  2. In the dialogue window that appeared I clicked on the Add button
  3. A new dialogue window appeared asking me to select the type of the VPN connection. I selected PPTP and clicked on the Create… button.
  4. A new dialogue window appeared with two tabs: VPN and IPv4 Settings
  5. In the VPN tab there was an Advanced button. When clicked a new dialogue window appeared with advanced options to select. I checked everything that I found checked in the Windows print-screens and left unchecked everything that was unchecked in them. In my case I had to deselect all authentication methods but MSCHAPv2 and check everything else in the dialogue box except “Send PPP echo packets”.
  6. And now if you save everything, the connection will succeed. But if you need access to some application installed on some servers accessed via their host names, you will need something called DNS suffix which can be added in the “Additional search domains” textbox in the IPv4 tab.
  7. If you don’t know what value to put there, and your colleagues didn’t tell you,(mine did not) you can do the following. Log into Windows and  connect to the VPN.
  8. Open a Command Prompt terminal and execute the following command: nslookup hostname You should get an output similar to this:
  9.             Server:  hostname.somedomain
                Address:  xxx.xxx.xxx.xxx
  10. Now, copy somedomain in the IPv4 tab, in the “Additional search domains” textbox and save everything.
  11. If you need the same kind of access I needed, also take a look in Firefox and the proxy it uses. Even if I had a successful VPN connection and a correct DNS suffix, I could not connect to http://server1:8080/application because my Firefox was set by default to “Use system proxy settings“. When I set it to “Auto-detect proxy settings for this network” it worked like a charm.

So, these are the steps that I took. I asked a Linux guru friend (Rpx) for help in debugging the VPN settings, because I am not that good at networking and I thought the additional information I discovered with his help, might be useful to somebody else too and that’s why I wrote this post. I will appreciate any kind of feedback.

Tags: , , ,