In this post I will tell you how to enable searching through node_modules using vscode.
Using vscode, by default searching through node_modules is disabled because obviously in most projects the amount of libraries included in node_modules is large. This will give a lot of noise when only searching for files within your own project. But what if you have a reason to search node_modules?
I want to be able to quickly open up the sources of a library I’m working with to see their implementation, when searching node_modules is disabled, I have to expand the file tree and manually go to the file each time. So for me it makes sense to enable searching through node_modules even if that makes my search results more noisy on average.
To enable searching through node_modules you must use the following configuration:
(Note: At the time of writing I am using vscode 1.21.1)
The pattern containing node_modules in the search.exclude key is followed by false, in order to disable that pattern. It is enabled by default. This setting alone would be enough if you are sure that you do not have a .gitignore or .ignore file because the ignore file is also considered. So set that to false to disable accounting for the ignore file ignores.
I would like vscode to have a way to let me keep search.useIgnoreFiles=true and whitelist certain patterns that apply after blacklisting. (Hint: feature request)
When creating a piece of software in Golang you are not obligated to separate your code into logical packages. You can go ahead and have everything in a single package called main and it will work fine. Until you start to write tests and the most simple unit test will take seconds to complete when running `go test`. Why is this? Because go test compiles that needs to be compiled in order to run the tests. So if you have defined only one package then EVERYTHING is going to be compiled. Even third party libraries…
So creating logical packages benefits your program’s structure and maintainability, but also speeds up your test times, or gives you back the time lost when testing with one package name. Depends on the angle you look at it…
the important part for me was adding the –prefix=origin/. Without this, it all becomes a big mess because?the remote branches will have an empty prefix which makes things harder for you in the future.
To create a .gitignore file based on your svn:ignore properties use the following command:
git svn show-ignore -i origin/trunk > .gitignore
git add .gitignore
git commit -m 'Add .gitignore from svn:ignore properties'
Again the critical part for my situation was to add the -i origin/trunk (or –id). Without it it doesn’t know what SVN branch you want the properties off.
All of this was shamelessly copied from http://john.albin.net/git/convert-subversion-to-git with some modifications to really make it work, because that post is a little outdated. Credits to John Albin.
It speaks about using the modesetting driver shipped with xorg instead of the xf86-video-intel driver. I did a benchmark with the xf86-video-intel and the modesetting driver to see which performs better in order to decide if I will drop xf86-video-intel. Here are the results:
Unigine-valley Basic preset @xf86-video-intel:
Unigine-valley Basic preset @modesetting:
It doesn’t really matter what hardware I’m using, all that matters is that the situation improved. But for reference: Intel HD Graphics 5500.
So my choice is simple, I’m ditching xf86-video-intel in favor of using modesetting, which was already installed on my system together with xorg-server.
because of the switch to modesetting driver the xbacklight utility does no longer work. Using a xorg config file with the Backlight option set to intel_backlight also does not work as a workaround. So I installed light-git (from the AUR) which allows me to control my laptop backlight once again.
Because of things like this I will stop using Firefox today. The article I linked to is about the file picker in Firefox, which is really lacking in many areas. My particular use case is as follows:
I use dropbox camera uploads to upload each and every photo/video I take. So on my laptop I have a folder containing thousands of photos and videos named in a “Y-M-D H.M.S.jpg” format. Now when I want to upload a few photos via Firefox, I do not get a thumbnail/preview for a jpg if the file is larger than 2MB(or has it got to do with a longest side of over 4096 pixels? either way no preview for me…). Another fun fact: 99% of my photos is larger than 2MB. So in order to find the photo that I want to upload I have to open up a file explorer and search in thousands of photos. Then I have to remember the name in the awkward format. Then I can head back to FF in the hope I still remembered the filename. This effort is only for uploading one photo… Imagine when I want to upload more than one photo. In short, usability is hard to find in Firefox when uploading photos.
For me this one (little?) thing is so annoying that FF is no longer usable for me. This annoyance have been present for over 10 years now!
Ubuntu 16.04 LTS is op 21 april 2016 uitgekomen. LTS staat voor Long Time Support en daarom is dit een versie van Ubuntu die het waard is om de komende tijd te gebruiken door middel van een live usb-stick.
Met Rufus een Ubuntu 16.04 LTS live usb-stick maken
Dit artikel legt je uit hoe je met behulp van Rufus een Ubuntu 16.04 live usb stick maakt. Volg de stappen:
Ga naar www.ubuntu.com
Klik op Download (rechtsboven, links naast zoekveld)
Klik op “Ubuntu Desktop >”, je komt nu op een pagina waar staat Ubuntu 16.04 LTS
Klik dan op de oranje Download knop
Nu willen ze dat je gaat doneren, scroll helemaal naar beneden en klik op “Not now, take me to the download”
Scrol een beetje tot je Download ziet en kies dan voor Rufus 2.8 Portable
Start rufus. Er wordt gevraagd of je online wilt zoeken naar programma updates. Klik maar op nee. Het programma start verder op. Doe je usb stick van 4GB of groter in je computer… even wachten tot je computer de usb stick herkent. Kies je Apparaat (usb stick) in de eerste dropdown, vul de rest in zoals de afbeelding weergeeft. Het veld Clustergrootte wordt automatisch ingevuld. Klik op het icoontje met een cd+drive om te browsen naar de ubuntu-16.04-desktop-amd64.iso. Het veld Nieuwe volumelabel wordt nu automatisch ingevuld.
Druk nu op Start.
(Het kan zijn dat er gevraagd wordt om een paar bestanden te downloaden die met syslinux te maken hebben, klik dan op Ja, zodat rufus deze automatisch voor je download.)
Er wordt nog een laatste keer gevraagd of je echt wilt doorgaan, klik op OK als je zeker weet dat je het juiste apparaat hebt geselecteerd.
Start nu je computer opnieuw op en start op vanaf de usb stick die je net hebt gemaakt door in je bios de boot order zo in te stellen dat je USB device bovenaan staat. Sommige computers geven ook een boot optie aan om tijdens het booten eenmalig de opstart disk te kiezen, dit is handiger dan de vorige optie omdat je nu geen bios instellingen permanent hoeft te veranderen.
Over the last three years I have made a lot of disk clones with clonezilla. I did this before reinstalling another OS or just to backup, but I always did it quickly. That means I just cloned the disk and never looked at it again. I only had to restore two or three times.
The problem is that because I did not really document anything about what is in the image, I now have no clue if I still want to keep image X or image Y. I need to see what is in the images…
So I’m restoring images by cat’ing together the compressed pieces of my images and decompressing them and piping that stream into partclone restore utility.
Now I keep getting this very obscure error:
Partclone v0.2.80 http://partclone.org
Starting to restore image (2013uncompressed.img) to device (2013.iso)
UID is root.
open source file/device 2013uncompressed.img
open target file/device 2013.iso
device (2013.iso) is mounted at
I have no clue what to do with that. So I downloaded an old version of clonezilla that contained the same version of partclone that the cloned image was made with. That gave the same error. Then I found an answer on askubuntu with zero rating. Just create the file first before you issued the partclone.restore. So to summarize:
Today I finally released my android application called Copydroid. Copy-what? Yes Copydroid, as the name implies this is an android application that copies something.
So let me explain to you what this app does: it lets you copy and paste between your computer and android device! How cool is that? No more e-mail sending or android cable searching to quickly transfer some text from phone to computer. You can now install Copydroid on your android device and a client on your desktop/laptop and setup a link between these two. After setting up you are ready to go! Just type some text on your computer, select it and copy it (CTRL+C!!!)… voila the text is now available on your phone or tablet or whatever android device you have that is connected to the internet.
It also works the other way around, so you could select for example a link in your favorite android browser, copy it. Go to your computer if you are not allready sitting in front of it and then paste (CTRL+V).
How nice is this? I already like it a lot, that’s why I made the app!
The app is available at the Android Market a.k.a. Google Play:
Update 08-03-2016: At the moment this app is unavailble because I have no time to maintain it.