Posts

Showing posts with the label tip

New blog domain: kula.blog

It's still work in progress but new posts will be published on  https://kula.blog/ Thanks to 11ty base blog RSS is working from the start so it should be easy to add to your reader if you still use any :) If now then I hope you can sign up to the newsletter where I'll be publishing new posts and interesting articles to it from time to time. Please use  kula.blog  from now on.

Best Articles form 2300 Pocket List

Image
At the end of last year I realized that there is no way I can read all those articles I have "saved for later". At that time I have about 2300 articles, some of them were really old, some about 'news' that weren't new anymore. Most form twitter but mailings like  JavaScript Weekly , Web Design Weekly  have a huge list too. Hardest category was WebGL, so many new ideas, math, matrix, lightning... "News" I can remember why I put most of those articles there, I really wanted to read them. The thing is hundreds of them were outdated. It was at least 1000 articles that were 'news'. Things like some early info about iOS5 or GoogleGlass. This kind of articles is fun to read but they have minor value. I have realized that removing them. There is really not much you can get from those but it's hard to realize that when they are new. Some time ago I've stumbled upon idea to put all things you want to read into a queue and read them after a...

faster command line keyboard settings

Image
Recently one of my colleagues asked how some presenters can have really fast keyboard - especially when going left or right in terminal using arrows. It was serendipity for me :) The only thing that you need to adjust (or maybe I need to get used to) is delay. It doesn't make that much difference but it's still good to have it slightly lower than default. Btw. Best thing about it is that there are similar setting screens in all Operating Systems these days so just go to Keyboard Settings and make "Speed" faster :)

Skype 4 installation on Ubuntu 12.04

Yesterday I tried to install Skype, but I have already installed one from Software Center (Skype 2.0) and installation of DEB file faild due to: (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 193346 files and directories currently installed.) Unpacking skype (from .../skype-ubuntu_4.0.0.7-1_amd64.deb) ... dpkg: error processing /home/kris/Downloads/skype-ubuntu_4.0.0.7-1_amd64. deb (--install): trying to overwrite '/etc/dbus-1/system.d/skype.conf', which is also in ...

Repair GRUB2 Boot

After installing Ubuntu next to Linux Mint, Ubuntu started to be default option. It was annoying :) I started to search how to deal with GRUB2, but the problem was about installing grub from Mint partition. The easiest solution is to install Boot Repair:  http://sourceforge.net/p/boot-repair/home/Home/ I've found it on Ubuntu forum:  http://ubuntuforums.org/showthread.php?t=1769482 I can recommend it, really worked from first try :) Install in Ubuntu: sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update && sudo apt-get install -y boot-repair && boot-repair

netbeans.conf - How to make NetBeans faster

I've started to experimenting with NetBeans again, but for that I need to make NetBeans faster... Consider adding to your /etc/netbeans.conf minimal and maximal Heap sizes (larger than default). -J-Xms256m  start level  -J-Xmx1024m maximum Adjust it to your RAM, and current memory usage. on Windows 7: netbeans_default_options="-J-client -J-Xss2m -J-Xms128m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.zip.disableMemoryMapping=true -J-Xverify:none -J-Xmx512m -J-XX:CompileThreshold=100 -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled " Ideas from:  http://performance.netbeans.org/howto/jvmswitches/ Beware that on LinuxMint I used only -J-Xms512  -J-Xmx2048m without GC and CompileTreshold due to slowdown of IDE and whole system (100% CPU without reason). The best idea is to experiment and try on your machine. Furt...

Missing GPG keys

Recently I've been annoyed by missing GPG keys in Linux Mint. Fortunately there are existing solutions: http://community.linuxmint.com/tutorial/view/172 But it worked when I changed keyserver to:  $ sudo apt-get update 2> /tmp/keymissing; for key in $(grep "NO_PUBKEY" /tmp/keymissing |sed "s/.*NO_PUBKEY //"); do echo -e "nProcessing key: $key"; gpg --keyserver keyserver.ubuntu.com --recv $key && gpg --export --armor $key | sudo apt-key add -; done Or You can try:  http://www.howtogeek.com/72934/how-to-automatically-import-missing-gpg-keys-in-ubuntu/ But first command worked for me.

Bashrc vs BashProfile

Good post about configuring .bash_profile and .bashrc files. http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html The result is: source .bashrc from .bash_profile because .bashrc runs for every session.

getElementById - how to check it

How to deal with getElementById Recently I found code: var d = document; function doSomething(name){ if( typeof document.getElementById(name) != 'undefined' ) document.getElementById('innerFrame_'+name).src=document.getElementById('innerFrame_'+name).src } For me there are problems in this code... getElementById can return only element itself or null.  http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-getElBId var d = document; function doSomething(name){ if( document.getElementById(name) ) document.getElementById('innerFrame_'+name).src=document.getElementById('innerFrame_'+name).src } Null is falsy, Element as Object is always truthy. Just use it as if condition. Logical problem in if condition and it's contents. I realized that function changes different element that it is testing for existence. The best option is to stop testing for existence of element by id of name, and check only for ...

What Should Every Programmer Know About Web Development

http://programmers.stackexchange.com/questions/46716/what-should-every-programmer-know-about-web-development There is everything, from design to security and advise to use MVC.

Chrome - Install Extension From Your Website

This can be really helpful to promote your chrome extension. http://code.google.com/chrome/webstore/docs/inline_installation.html With this API it can be easy to ask users to install extension without browser sniffing and content script just to disable promotional popup on site when extension in already installed.

text-overflow: ellipsis for easy "..."

As described on  http://www.quirksmode.org/css/textoverflow.html Can be used to create "..." for too long texts within blocks with overflow:hidden. This can be really useful tool.

Komodo Edit Themes

From some time I use Komodo Edit, mostly because it is fast. I doesn't like default Komodo Color schemes. They all seem to be not better from no color scheme at all... I found today interesting site:  http://www.kolormodo.com/

Easy Unit Testing

Recently I read article about Unit Tests:  http://blog.tabini.ca/2011/09/the-easiest-way-to-add-unit-test-to-your-application/ This is more about how to deal with application that already exists, and works. I totally agree with author, there is no point in sitting for three months only to add them! But adding them while working is much smarter! I agree that TDD is great, but this is good if You know what You want to build. I used to build prototype to get  idea how it can work and after that refactor it, and add features until it is good.

Git in Windows

Image
There is new application for Git that works on Windows and Linux (using Mono). http://code.google.com/p/gitextensions/ This application is interesting because looks stable, and have very friendly installer (msysGit is included). I saw it on Windows and this works pretty stable.

Bootstrap Toolkit from Twitter

Bootstrap if toolkit from twitter that will bring to Your website good looking CSS at start point. http://twitter.github.com/bootstrap/ Bootstrap uses LessCSS  but can be used just as CSS, Less just will help you customize Bootstrap faster.

Windows batch - send message

http://stackoverflow.com/questions/843585/windows-how-to-display-a-non-blocking-alert-confirmation-window msg * type message here

Add Lancher to Gnome-Shell dash

http://lucidelectricdreams.com/blog/2011/06/adding-your-own-launchers-to-gnome-shell-dash/ I want to have fast access to ebook I mention yesterday so I wanted to add it to dash... It isn't easy enough! (yes I have in mind that Gnome3 was supposed to be easy... ) After some time with Gnome-Shell many times I want to add something to top Panel like I was adding it to Panels in Gnome2, together with desktop that is only wallpaper I can't have any custom shortcuts on desktop :( Conky is troublesome - I am used to know if CPU and RAM are ok, any ideas for nice conky replacement?

git-svn dcommit to new svn repository

I was unable to put my Git repository to new SVN one, so for the future first create dummy svn repo, then clone it using git svn and work on this :)

JavaScript OneLiners

http://stackoverflow.com/questions/472644/javascript-collection-of-one-line-useful-functions

Git Cheatsheet

http://blog.fournova.com/2011/06/git-cheat-sheet/ For me white version is most readable: http://www.git-tower.com/files/cheatsheet/Git_Cheat_Sheet_white.pdf