26 Ağustos 2014 Salı

Google Chrome using with proxy in Linux

If you also reach internet via proxy, you can encounter this problem in Linux. Although you set up proxy server in console, you couldn't connect internet over Google Chrome. So you open a command prompt(especially bash) and write this command:
linux@linux:~/$chromium-browser --proxy-server=*.*.*.*:*

*.*.*.*:* = your proxy server ip and port

22 Ağustos 2014 Cuma

How to check whether a string contains a substring in Ruby

If you look for a method in order to use while searching a string contains a substring, you could use this method;
a = "Skill"
if a.include? "ll"
    puts "exist"
end

20 Ağustos 2014 Çarşamba

How to get exact number in a string with using ruby

When I search a useful code block so as to find exact number in a string, I come accross this fruitful function in Ruby:

  • str.delete("^0-9.")

4 Ağustos 2014 Pazartesi

error: device unauthorized. Please check the confirmation dialog on your device.

While encountering this error in linux shell, you could fix it by applying below instruction
  •  unplug your device
  • (in shell) SDK_DIR=(android_sdk_directory)
  • cd $SDK_DIR/platform_tools
  • ./adb start-server
  • plug device
  • confirm authorization

2 Ağustos 2014 Cumartesi

Convert pdf to image in linux

If you look for a tool in order to convert a pdf document to a image, you could use a useful command:

convert document.pdf document.png

this little tool come in handy very much.

1 Ağustos 2014 Cuma

Quick ntfs format in Linux


sudo mkfs.ntfs -f /dev/sdb1
 
NTFS is a journaling file system.Hence Don't forget unmount your disk before unplugged.

qemu-timer.o: undefined reference to symbol 'timer_settime@@GLIBC_2.3.3'

Another good solution is here while compiling qemu.

../.././gcc/libgcc.mvars: No such file or directory

This bug struggled me for a long time. Therefore, I found a good solution in here.

Fruitful Regex Hints

Minimum 8 characters at least 1 Alphabet and 1 Number:

"^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$"
 
Minimum 8 characters at least 1 Alphabet, 1 Number and 1 Special Character:


"^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$"

Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet and 1 Number:
 
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$"



Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character:

"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}"


Minimum 8 and Maximum 10 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character:
 
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,10}"