Using Dependency Links for PyPi package - igraph

I need to link my pypi project to a specific page (to download python-igraph) which is here (https://www.lfd.uci.edu/~gohlke/pythonlibs/). How would I modify my dependency_links array to link to the external download?

The page uses javascript tricks to avoid being pointed to that way. It's a free resource, please don't overuse it by automatically download packages from it.

Related

How to embed Go HTML templates into code?

I have a set of templates as files, like base.html, login.html, profile.html, header.html and so on. They are structured in folders.
It's fine to have them as separate files during development but when I deploy the app, I'd like to have them all embedded as strings or parsed and compiled templates ready to use from the code as usual.
How should I better make these templates as Go code? So that I don't have to have a templates folder in production, but everything in the single executable file?
With Go 1.16 there would be official "embed" package and the following would be possible (is possible if you read this after February 2021):
//go:embed "mytemplate.tmpl"
var myTemplate string
This code embeds mytemplate.html at compile time and it becomes available as a string (or as []byte or as a FileSystem, if you wish). No 3rd-party tools or libraries needed.
The most simple solution is to embed templates in string literal inside Go source code.
There is a tool that can help, see go-bindata.
I used go generate in some of previous projects for this type of operation, see blog post on go generate command for introduction.
As of the Go 1.16 release, there is the //go:embed comment directive.
This allows you to directly embed files in your binary.
Link for draft design of the go:embed comment directive
Link for the Github issue for go embed with some updates
In addition to go-bindata which was already mentioned, there is go-bindata-assetfs which you can use to serve static files from a webserver. It's good for Javascript, CSS, etc.

ZF2 versioning of assets to avoid caching of old files

I have a ZF2 project where I generate, minify, etc... my assets via gulp. For example I generate a styles.css file which gets included with the ZF2 headlink view helper:
echo $this->headLink()->appendStylesheet($this->baasePath('assets/css/styles.css));
Now I have the problem, that the file gets cached by the browser and does't notify any changes. Does anyone know a way to handle that? Maybe add a version number to the generated css file, but then I really don't want to edit all the ZF2 templates which inlcude that file.
Thanks for any reply.
There's a load of ways to do this, but one option is to use Assetic - a well known asset manager package. Tere's a few ZF2 modeules to help integrate this library into the framework too. A quick google search throws up some:
https://github.com/magnetronnie/zf2-assetic-module
https://github.com/kriswallsmith/assetic/
This module will help manage assets such as CSS/JS, and also has some "cache busting" features where by you can change the url based upon the file modification date to ensure if changes when ever the file is re-downloaded by the browser.

Jekyll Contentful, how to hide api key from config file?

Jekyll contentful plugin is configured in the config.yml file. But if I publish the repo on a public github repository, the api key will be available for anyone to use it.
How can I avoid that?
You can use CloudCannon (CMS for Jekyll) as an alternative. CloudCannon does not require an API key, supports Github and allows you to use a private repo. The free account should fit your needs.
Currently there is no possible way to do that.
Please open an issue on GitHub and we'll add that feature as soon as we can.
Else, as a workaround, you can omit your config.yml file from being pushed if you're not using it for GitHub Pages, by adding it to your .gitignore.

using google web components with polymer

I am using google web components from the following page but it seems that it has a lot of error. A lot of file is not found. Note: I am using google sign in and google analytics.
Google Web Components
How to resolve the issue without downloading and replace the the missing file path one by one?
You approach is completely wrong.
TL;DR One can not simply refer the url for the file and hope that relative paths in it are resolved automagically. The workflow is a way more complicated.
You should create an application (the easiest way is to use Yeoman’s generator for that). Than you should explicitly specify, which components you want to use with bower:
bower install google-calendar --save
... etc
That would install the components locally (--save is to update your bower.json).
Then you probably would vulcanize everything (thanks yeoman generator, grunt script comes with all the tasks prepared.) Your project is now ready to deploy.
Hope it helps.
You should be able to install the missing dependency components the same way you got your Google Web Component. Whether that is via download or bower or whatever, just make sure the relative paths line up. Even if you create a build task or generator you will still need the components dependencies correctly referenced.

Can you bundle live templates into a plugin/package in PHPStorm?

I have a selection of live templates / snippets specific to a particular framework that I would like to distribute as a plugin/package. Is it possible to do this for PHPStorm/WebStorm?
I have managed to do this for the Sublime Text 2/3 editor very easily and my package is now accessible via the package manager. In short I'm wanting to do the same for PHPStorm, allowing people to download my live templates as a plugin from the plugin repository.
I think you can use answer from this question How can I create custom Live Templates with an Intellij plugin.
You need to create DefaultLiveTemplateProvider and register it in plugin.xml