Well, to make a long story short, I make large scans that don’t need to be on my system disk, I would like to have them stored on the spinning disk, So, i searched online, and found that people were suggesting that I create a symlink to the new location in place of the Scanned Documents folder, Something like
The above obviously has downsides, backup software, changed disk IDs, or other unforeseen effects, In my mind, there is no way the developers of Windows Fax And Scan have hard coded this into the application,
Another solution would have been to move the entire Documents folder (Right click it, then change it’s location, windows provides that option), But not everyone wants that, So there is a third more elegant solution (Even though this works like a charm)
The third is to look in the registry (Find) where Windows Fax And Scan stores it’s path (Look for the word scanned for example), and change that, but i Have already gone with the second, the third should be simple
The lowdown, applying grease to the fan pin works, no idea for how long (Already ordered a replacement fan from the HP website just in case), but when this fan fails, I will certainly update this post (Today is April 18, 2020).
The only reason i use my HP Envy 17-s143cl which has a slow I7-7500U (X0S43UA) is because it is silent most of the time, and quiet when the fan eventually spins up, not any more, today, the fan was very loud, and vibrates heavily, sometimes banging above the fan resolved it (Don’t try if you have a spinning disk, you will damage it, I have an SSD inside so it is okay).
So i took the laptop apart, extracted the fan, opened the fan casing, and then the plastic fan separates from the coil by simply pulling it out (With very little force, if you need any force you are doing it wrong).
So, like you see in the photos above, I applied some automotive lithium grease to the pin, and put everything back how it was, the fan is working very smoothly, just like before, if it fails and that is a good possibility, I will update this post, but for now, it looks like a hit
Also worth mentioning is that i usually add such lubricant to PC fans, the cheap $1 fans, they usually need the lubricant after a few months, but after adding the lubricant under the back sticker on a desktop PC fan, they usually work for years more without problems, so I expect this to not give me any trouble, but in any case, I have already ordered a replacement just in case, turns out the HP store is cheaper than ebay and amazon, Just go to HP and find the part you need, mine was the one below. it cost me with shipping an all around 32 US dollars.
806747-001 In stock FAN – for Broadwell SKU (Fanless design for Braswell SKU) RoHS: COMPLY_2.05
In short, You can (Up to date systems) mount it in 1 go with something like
mount -o loop /path/to/my-iso-image.iso /mnt/iso
Step 1, what is the next loop number we can mount on ?
losetup -f
This will probably result in something like /dev/loop0 (Which is the next ready loop to map the ISO to
losetup /dev/loop0 /path/file.iso
Then, mount the loop device with the mount command
mount /dev/loop0 /mnt/dir
That’s it, The new solution and the old, As always, i keep things here as a not to self, because sometimes I come across older computers, and I forget how it was done since all the mounting I do now the new way
In this post, I will be explaining how to watermark videos with a PNG image watermark that is transparent where it needs to be, I will cover both Linux and Windows (Not much is different on the ffmpeg side, the difference is when you want to traverse a directory (The script).
The watermark you see here is what I want to overlay over the video, If you right click and view the image, you should be able to see that around the text, it is transparent.
The PNG with transparency to be overlaid over the video
now, let us assume that the file in the directory is called x.mp4, and this watermark image is called watermark.png, then the following commands should overlay this image over the video
The code above will create a new file (x1.mp4) which has the overlaid watermark, as you might be able to see if you execute the above the watermark is positioned at the top left corner of the video, which is not necessarily what you want, now because we know the dimensions of the watermark image, we can ask ffmpeg to center it horizontally (and if you like vertically to have it in the center of the image, but this is not what i want.
So let’s assume the video is full HD, meaning it has the dimensions 1920 x 1080 (Width x Height), and the image, as you can see has the dimensions (500 x 100), what i want here is to have the watermark centered horizontally and nudged down 100 pixels vertically, the code to do that would be
Now with the process of watermarking out of the way, How do we batch process videos under windows and under linux ?
Under Linux it is simple, I put all the input files in a directory named “in” and all the output is to be put in an directory called “out”, the shell script (batch file) is at the root where those 2 directories exist, the shell script is this
!/bin/bash
OIFS="$IFS"
IFS=$'\n'
for filename in "in/"*.mp4; do
ffmpeg -i "$filename" -i /apth_to_watermark/watermark.png -filter_complex "overlay=x=(1920-500):y=(1080-100)" "out/$(basename "$filename" .mp4).mp4"
done
IFS="$OIFS"
I have never been good at windows, so i looked around for a script to traverse a directory, I found some stuff, and here is my final result, if you can clean it up and make it more robust, please do leave me a comment and i will improve with your recommendations.
You can not just copy an LXC container, wat you need to do is among the lines of
cd /var/lib/lxc
tar --numeric-owner -cf container_125_fs.tar vm125
The magic is mainly about maintaining the numeric owner of files, which is lost when you copy the files using the host machine 😉
you can untar it the same way you untar any other tar file.
for example, to untar it to a different location, you can use the command
tar -xf container_125_fs.tar -C /target/directory
This whole thing is very useful in moving a container to a different directory, then modifying the config file to point to that directory, as well as moving it to a different machine, the reason you can’t just move it is that moving will cause some issues as the move command does not take the ownership differences between host and guest into account.
When you want to do this, odds are, you know what kind of file you are looking for, My first guess would be you would not be looking in zip, mp4, flv, etc… those are huge files, where in the unlikely event they do contain your string, it’s still not the file you are looking for…
So, you would probably want to look at the problem as, search the contents of text files for a certain text string
the best way to acheive that is to start by allowing the find command to find text files that may contain that string, then passing the “candidate for searching” files to the grep command
So if I am looking for a config file that contains a config named living-room, I would use a search such as this one
What is nice about this is that you can also look at both separately, so the find command has plenty of documentation online, and so does grep
Now, there are other ways to do this, the most popular of which is using grep on it’s own, here are some examples
The directives are as follows
i stands for ignore case (Slows things down, but sometimes necessary).
R stands for recursive. (Look inside inner folders depth first)
l stands for "show the file name, not the result itself".
e look for things matching a patern
--include Include files that match this pattern
--exclude Exclude files that match this pattern
--exclude-dir exclude directories listed
Examples
grep -Ril "text-to-find-here" /
grep --include=*.{c,h} -rnw '/path/to/somewhere/' -e "pattern"
grep --exclude=.o -rnw '/path/to/somewhere/' -e "pattern" grep --exclude-dir={dir1,dir2,.dst} -rnw '/path/to/somewhere/' -e "pattern"
Troubleshooting: The w above makes this a regex ! so if you don't want that, remove the w n stands for line number ;)
As usual i will start with the main points / the lowdown
1- Car voltage can (Depending on car) can go up to 15.3 when bulk charging the battery, the maximum voltage for the LD1117AV33 is 15V, so it is a no go.
2- My DoIt esp12F devkit came fitted with the AMS1117.
The regulator that shipped with my DoIT esp12F devkit is the AMS1117, which seems to be an excellent choice providing up to 1A of current, and accepting input voltages of up to 18V ! Yet, the voltage regulator is not fitted with a heat sink, hence, it will provide nowhere close to 1A reliably
the three liniar regulators I will be comparing in this post are
 ld1117v33
 lf33abv
 TC1262
Maximum Input Voltage
15V
16V
6V
Minimum input voltage (Based on dropout voltage)
4.3V
4.3V
4.3V
Can we change the input voltage while application is switched on
 Yes
  Yes
  Yes
Maximum current draw (Is it enough for my application)
Higher is better
800
500
500
Quiescent current
Current drawn with no load (Not too relevant to cars)
Lower is better
5.5 mA
 0.5 mA
 0.070 mA
Even though i have always used the LD1117AV33 Linear Voltage Regulator in IOT projects, simply because it can provide up to 800 MA of current at 3.3V, I had to look at other voltage regulators for this particular project because it involves a vehice, Now, you may want to skip to the comparison table if your IOT project is not for a car, but
As usual, I post my research in this blog for my own use and so that others can benefit from it, so sometimes it looks as though it is not well written, but it could spare you a long time of research
First thing you need to know, is that not all cars have the same voltage, the 12V car battery voltage is nominal, a car battery is usually full and in good health when it’s voltage is around 12.8 or even 12.9 (while the car is off), and because the charging circuit differs from car to car, A car alternator might step up the voltage to up to 15.3 when it is bulk charging the battery, and float charge a car battery at 14.2 or 14.3 when it considers it full, so bottom line, a linear voltage regulator needs to tolerate at least 15.5V
Even though i have always been using the LD1117AV33 step down, and indeed it is a reliable thing, I can not find any document that states that going above the maximum input voltage of 15V is okay, hence, the regulator is disqualified from the word go
Super resellers (Sells reseller accounts)
DomainResellerDirect.com
The main purpose of this list is for my own reference, as I try to make my own reseller account work for me, as i investigate how they are making it happen, i will probably learn a bit from them.
I have this bad habit of copying things so many times when modifying them, when that is a large database, we talking many gigas, so here is a script to find those duplicate files among many hard drives and telling you which ones are duplicates, moving and deleting and symbolic linking is done manually after.
1- this script is PHP-CLI, so make sure that is installed on your computer
2- this script runs the find command, make sure it can execute that program
3- you run the script with the path parameter, but will need to edit the script to change the 1GB size i have hard coded
What this script does is
1- find files with size greater than 1GB (find /hds -size +1G)
2- Store the files in database with size
3- retrieve the files ordered by size
4- if 2 files have exactly the same size, calculates MD5sum for the first MB of the file
5- If the MD5 of the first MB of the files are the same, calculate the whole MD5
6- If they turn out to be duplicates, they are printed to the command line
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok