force sips command to write output to stdout

I wrote a script that convert a icns file to png and then encode the png with base64.

I could do it in 2 steps:

  • sips -s format png test.icns -o test.png
  • base64 -w0 test.png

But since test.png is just an intermediary file, I’d like to pipe the output of the 1st command directly to base64, how do I do that?

Note that sips doesn’t seem to support /dev/stdout as the argument of -o.

plotting – How to properly write multiline text with LaTeX symbol in a frame and with background

I wanted to include a number of text-box with background color white inside a plot. The text inside the box will also have LaTex expressions as well as multiple lines.

Is there any way to include multiline text (including LaTeX symbol) inside a plot?

In addition I want to set frame and background color for the box.
I am currently using Epilog and Prolog to include such text.

  PDF(BinomialDistribution(50, p), k)}, {p, {0.3, 0.5, 0.8}}, {k, 0,50}), 
  Filling -> Axis, 
  FillingStyle -> Automatic,
  Epilog -> Text(Style(ToExpression("\text{E}_{x} \n text2", TeXForm, HoldForm),Bold),{30, 0.13}),
  Prolog -> {Inset(Framed( "E_{x}ntext2" , RoundingRadius -> 5,Background -> White), {45, 0.13})}
(*Prolog -> {Inset(Framed( MaTeX("E_{x}\n text2" ) , RoundingRadius -> 5,Background ->White),{45,0.13})}*)

Option-1 fails writing E_{x} as well as breaking line.
Option-2 fails writing E_{x} but breaks line.
Option-3 is the one I wanted but it fails in breaking line.

Is there any way to achieve this.

Moreover I also wanted to ask, what should one do if one has to include say more that two text boxes?

I will manually write SEO Friendly 500 word Unique Articles/Contents/Blog for your Site for $6

I will manually write SEO Friendly 500 word Unique Articles/Contents/Blog for your Site


Allow me to produce an intelligible, clear, and precise article, blog post, copywriting, or research summary that is easy for any reader to understand. I guarantee unique, plagiarism-free, grammatically correct, extensively researched, SEO optimized articles, blog posts, copywriting, and research summaries.

My name is AKBiswas and I am passionate about writing and editing. It is only natural that I would gravitate towards producing written content that is related to topics that interest me such as:

  • Science (chemistry and biology)
  • Finance
  • Travel
  • Food
  • Health and wellness
  • Fitness
  • Fashion
  • Scholarship
  • Business
  • Technology
  • Beauty and lifestyle
  • And much more!


  • Your choice of topics
  • 100% Unique (plagiarism free content)
  • 100% Copyscape passed article
  • 500 words Professional article writing (If you want more words, select EXTRA)
  • High-Quality Article
  • SEO Optimized with the best structure and keyword density
  • Well Researched oriented write-up
  • Great English command and structure!
  • Great grammar structure
  • All Niche or Category

Please send me a message if you would like to place an order!


algorithms – Write the method stopAtFive (int j)

Write the method stopAtFive (int j)

instructions are below:
write the code for the method, where you keep generating random numbers from 1 to 10 until you get j number of 5’s. Every time you get a 5, you go to the next line. Once you get to j number of 5’s, you stop. For example: if j was equal to 3, then a possible output printed to console is like:




As you can see from the above output, there was 3 lines because j equals 3, with each line ending with 5. That is what we are trying to do here.
Whenever you get to a 5, you go to the next line and repeat until there are j number of 5’s. Remember to print to console.

Write Google and Others Site Product Reviews or SEO Article for $5

Write Google and Others Site Product Reviews or SEO Article

Thank you for visiting my Gig Description. I’m Rifat from NYC. I am a Writing Master and a Professional writer. I’m also a Master of Editing PHOTOSHOP !!!

My service:

$-100% Safe

$-Timely Delivery

$-Professional Service

$-Safe work

$-Quick Responsiveness.

$-No need of any admin access

$-24/7 Customer Support.

-Don’t worry about the Orders number in Queue.

I have 5 years experience in this.

!!!!!!!!!!ORDER NOW!!!!!!!!!!!!


calculus and analysis – Write some expressions of the integral

I am trying to apply the Hamilton principle and the final part is the integration. then I should pick some parts only in sperate equation. for example.

The full equation is Integrate[δT - δU + δW, {t, t1, t2}]

Then the result will be an integral that has many terms. For example :

X^2 b + y b + c x^2 + c x + xy c

Then I need to get two equations.
First equation is any thing has term b : X^2 + y

The second equation is anything has the term c: x^2+ x xy

note: the equation I am dealing with is much longer and more complex but this is the basic idea.

sql server 2016 – Script to backup TDE certificate and Key throws error Cannot write into file

I am attempting to automate TDE key backups. I created the stored procedure below and was going to schedule it to be executed as a sql agent job.

However, when I execute the procedure I get this error after about 20 seconds:

Msg 15240, Level 16, State 1, Line 3
Cannot write into file ‘\FileServerNameTDEcertificateBackupsServerName_CertificateName_CurrentDate_key.pvk’. Verify that you have write permissions, that the file path is valid, and that the file does not already exist.

I have tried the following:

  • Verified that the SQL Agent account has full access to the UNC path.
  • UNC to the UNC path to validate it.
  • File does not already exist as the folder location is empty
  • Used the PRINT @SqlCommand results and ran them under my domain admin account.
  • googling it 🙂

After reading the documentation, saving to a UNC path should work.
Is this a permissions issue that I need to track down with the network/sys admins, an error with my script, or some other “gotcha” I’m not currently aware of?

Stored Procedure:

CREATE OR ALTER PROC dbo.BackupTDEcertificate
    This script can be used to backup the certificate and private key used for TDE.

/*Declare variables*/
SET @DateTime = 
--SELECT @DateTime
DECLARE @CertificateName NVARCHAR(50) = (
    SELECT TOP 1 (Certificate)
        master.sys.certificates CER
        CER.start_date DESC
)--SELECT @CertificateName
DECLARE @Path NVARCHAR(150) = '\FileServerNameTDEcertificateBackups'
--SELECT @Path

/* Perform the backup*/
DECLARE @SqlCommand NVARCHAR(2000) =N'
        USE master;
        BACKUP CERTIFICATE ' + @CertificateName + ' 
         TO FILE = N''' + @path + @@SERVERNAME + '_' + @CertificateName + '_' +@DateTime + '.cer''
             WITH PRIVATE KEY ( 
             FILE = N''' + @Path + @@SERVERNAME + '_' + @CertificateName + '_' + @DateTime + '_key.pvk'',
            ENCRYPTION BY PASSWORD = ''1Cannot.Observe.Known!''
PRINT @sqlcommand --Actual procedure has this line commented out.
--exec sp_executesql @sqlcommand --Actual Procedure does not comment this line out.

How to give an ftp user write permissions for a select site (DreamHost if that makes a difference)?

So if the filepath when logged in via SFTP is home/ftpuser/sitename/ how do you set it so ftpuser has write permissions for all things in sitename? And ideally in sitename2 as well, but not sitename3?

I see the permissions for directories are set to 755, and the files are 644, but I don’t understand what to do next.

Something to do with SSH and adding the user to a group or something? Creating a group first? I’ve tried googling and just get confused.

I just want to set it up so ftpuser can go in SFTP and edit functions.php or upload a php.ini, or whatever they need to. As of right now they can download and view things, but not edit.

Note I am ftpuser and am requesting this info for the actual owner, so I need an explanation that makes sense without being able to try it myself, and simply being the owner account doesn’t work (unless you can have multiple owners?).