How to fix size of powerline in Spacemacs? - powerline

How to fix size of powerline in Spacemacs?
Somehow my powerline changed in size.
Screenshot: [

How to fix size of powerline in Spacemacs?
It seems like problem with unicode.
Solution for Fedora 23:
sudo dnf install adobe-source-code-pro-fonts

Change the powerline-scale to 1.1
And It will fix the problem
dotspacemacs-default-font '("Consolas"
:size 16
:weight normal
:width normal
:powerline-scale 1.1)

Related

Rails 6 Axlsx Excel Gem - Images not displaying

I don't know if it's my fault or if it just doesn't work with Rails 6, but my images in the file are not displaying:
I tried:
img = File.expand_path(Rails.root+'app/assets/images/logo.jpg')
and also like described in the examples:
img = File.expand_path('../logo.jpg', __FILE__)
sheet.add_image(:image_src => img, :noSelect => true, :noMove => true) do |image|
image.start_at 5, 20
image.end_at 7, 22
end
The image is found (at least I don't get an error for this) but the only thing I see in the generated file (the rest of the creation works fine) is:
Could it be the image size not fitting in the cells? Or is it resizing automatically?
Any suggestions or ideas? I don't know what's wrong or what else I could try
Did you try setting height and width for the image? Have a look at this old answer https://stackoverflow.com/a/47982814/1796645 (potential duplicate question)
If you found a bug, then you could report it in https://github.com/caxlsx/caxlsx/issues

How to improve dpi/resolution pdfkit

Currently using pdfkit, for the most part it's been great to use.
The only issue is line thickness. Borders on the source html look great, on the pdf generated look much thicker.
Also thickness varies in the document. On lines of the same width, it appears thicker in places. Even borders on the same div may appear thicker on the 3 of the 4 borders, even though they have the same CSS.
Any way to remedy this?
Well if you explore the extended help -H on wkhtmltopdf you would find a options called dpi
So perhaps you can set a dpi in pdfkit something like this
PDFKit.configure do |config|
config.wkhtmltopdf = '/path/to/wkhtmltopdf'
config.default_options = {
:page_size => 'Legal',
:print_media_type => true,
:dpi => [your dpi setting]
}
# Use only if your external hostname is unavailable on the server.
config.root_url = "http://localhost"
end
Note
Having said that it you examine the help deeply you would know that that it states
-d, --dpi <dpi> Change the dpi explicitly (this has no
effect on X11 based systems)
I clearly state it has no effect on system that based on X11 so I would rather see that of any help for you
Other options
So dpi options is hardly of use what are other options ?
Well in fact there is one check this link and trace to last comment and see some of that help in your quest (i.e try increasing the resolution of the xvfb in case if your running an xvfb server)
Hope this help

How to specify a method in pngcrush?

I am optimising a whole directory of images with 10000 png images. I did use the brute to test and for the first 100 it was method 11 is the best for compression.
You know that pngcrush uses like 130 different methods to try on an image and this is really taking too long.
I did try to input -brute -m 11, but this will let it start from 11 and go up.
I only need method 11 to be applied.
Here is my script :
#!/bin/sh
for png in `find $1 -name "*.png"`;
do
echo "crushing $png"
pngcrush -brute -m 11 "$png" temp.png
mv -f temp.png $png
done;
Any idea how to work around this and only apply method 11 ?
btw pngcrush works best with my images so please don`t suggest optimisers like pnggauntlet or pngoptimizer.
Thank you all
Kind Regards
My bad ... I shouldn`t have used the -brute command and it should have worked :-)

FloatDomainError (Infinity)

I use carrierwave and mini_magick to upload images. In development everything is fine, but in production it raises FloatDomainError (Infinity) when i try to upload an image. I have several projects hosted at the same server and everything is fine with uploading.
I use Rails 3.0.10.
Any ideas how can i fix it? Thanks
I had the same problem. The problem is mini_magick. If the image file it runs identify on is erroneous, identify will output some kind of error, e.g.
identify: Corrupt JPEG data: 7929 extraneous bytes before marker 0xed `image.jpg' # warning/jpeg.c/EmitMessage/230.
11811 8665
mini_magick tries to parse the error message as the dimension, and the result is 0. This results in a division by zero which results in the exception you mentioned. This is the reason why it only fails with some images.
identify has a -quiet options to turn off these warning messages. I have forked mini_magick at https://github.com/fschwahn/mini_magick and added the quiet option. I hope this change will be pulled in (or the problem will be fixed in a more elegant way). However, for now you can use my fork by adding the following to your Gemfile:
gem 'mini_magick', :git => 'git://github.com/fschwahn/mini_magick.git'
Fixed that with replacing resize_and_fill to resize_and_pad. Still don't understand its strange behavior.
I was using the Ubuntu Imagemagick package version 6.7. I upgraded to 6.8 following the instructions here: https://askubuntu.com/questions/267746/how-can-i-install-the-latest-upstream-version-of-imagemagick-without-compiling and it worked.
I got this error with the newest gem update, when I generated an image thumbnail for my pdf file.
This code fails:
version :thumb do
process :resize_to_fill => [260, 192]
process :convert => :png
process :set_content_type
process :thumbnail_pdf
end
I solved it by replacing the order of the lines. The key was that before resizing MiniMagic should first convert thumbnail to image and after that should try to resize.
Here is solution which worked for me. Maybe it'll help for someone.
process :convert => :png
process :resize_to_fill => [260, 192]

How to avoid shadow apply to a rich_marker in Gmaps4rails

Recently I've managed to dael with RichMarker and Gmaps4rails gem! Thanks to Apneadiving!
But now there is a nasty shadow that I cant remove.
tried
:shadow_picture => " "
and
It even seems not to be in the CSS.
And tried to do like it is told in wiki
like
:marker_anchor => [10, true]
any ideas?
I updated the doc but didn't push the code...
Install v0.11.1 and use your correct code: :marker_anchor => [10, true]

Resources