Taking a screenshot of html without dependencies - laravel

Problem
I want to be able to save an image of either a div or a page (whichever easiest) without using dependencies.
So I have been browsing around for awhile to find many solutions to this problem, most of them I have found use dependencies such as BrowserShot or something else. I was wondering if there was some way to do this without dependencies other than ImageIntervention to manage the images.

I decided to use google's speed API for taking screenshots. I originally was trying to avoid this due to not being able to use it for development since that would be hosted locally.
The solution is described pretty well here.

Related

XPage Osgi plug in development

background
I have designed many tools in the past year or so that is designed to help me program for XPages. These tools include primarily helper java classes, extended logging (making use of OpenLogger and my own stuff), and a few other things that I personally feel I cannot work without. It has been discussed with my employer, and we feel that it might be a good idea to start publishing these items to openNTF. Since these tools are made up of about 3 .nsfs, all designed to use the same java code, key javascript classes, css, and even a custom control or two, I would like to consolidate key items into a plug-in that can be installed at the server and client level. I want to do this consolidation before I even think about publishing any of the work I've done so far. It would just be far too much work to maintain, not just for me, but for potential users. I have not really found any information on how to do such a thing in google searches. I also have to make sure that I am able to make use of the ExtLib libraries, openNTF Domino API, and the Notes API.
my questions
How does one best go about designing such plug-ins? Must a designer
use eclipse, or is this it possible to do this directly in the Notes
Designer?
How does a designer best go about keeping a server and client up to date while designing and updating the plug-in code? Is this why GitHub is often used?
Where is the best place to get material to get started in this direction? I sort of feel lost in the woods, knowing I need to head north, but not having a compass for that first step.
Thank you very much for your input.
In my experience, I found that diving into plug-in development is a huge PITA until you get used to it, but it's definitely worth it overall.
As for whether you can use Designer for plugin development: yes, but you will likely eventually want to not do so. I started out by using Designer for this sort of thing for a while, presumably with the same sentiment as you: why bother installing another instance of Eclipse when I'm already sitting in one all day? However, between Designer's age (it's roughly equivalent to, I think, Eclipse 3.4), oddities when it comes to working sets between the "Applications" and "Project Explorer" views, and, in my case, my desire to use a Mac app, I ended up switching.
There are two major starting points: the XSP Starter Kit (http://www.openntf.org/internal/home.nsf/project.xsp?name=XSP%20Starter%20Kit) and Niklas Heidloff's video on setting up Eclipse for XPages development (http://www.openntf.org/main.nsf/blog.xsp?permaLink=NHEF-8RVB5H). The latter mentions the XPages SDK (http://www.openntf.org/internal/home.nsf/project.xsp?name=XPages%20SDK%20for%20Eclipse%20RCP), which is also useful. In my setup, I found the video largely useful, but some aspects either difficult to find (IBM's downloads are shifting sands) or optional (debugging, which will depend on whether or not you're using Eclipse on Windows).
Those resources should generally get you set up. The main thing to worry about when setting up your Eclipse environment will be making sure your Plug-In Execution Environment is properly done. If you're following the SDK setup instructions, that SHOULD get you where you need to be.
The next thing to know about is the way plugins are structured. Each plugin you want to install in Designer or Domino will also be paired with a feature project (a feature can house several plugins), and potentially an update site - the last one is optional if you just want to import the features into an Update Site NSF. That's how I often do my normal plugin development: export the paired feature to a directory and then import the feature into the server's Update Site NSF and then install in Designer from there using Application -> Install. You can also set things up so that you deploy into the server's plugin/feature directories instead of taking the step of installing into an update site if you'd prefer. GitHub doesn't really come into play for this aspect - it's more about sharing/collaborating with your code and also having a remote storage location for your git repositories (which I highly advise).
And as for the "lost in the woods" feeling: yep, you'll have that for a good while. There are lots of moving parts and esoteric concepts to get a hold of all at once. If you mostly follow the above links and then start with some basics from the XSP Starter Kit (which is itself a plugin project that you can pair with a feature) - say, printing text in the Activator class and making an implicit global variable just to make sure it works - that should help get your feet wet.
It's best done in Eclipse. You can debug your code running on the server from there, as well as run it directly from there. The editors are also more up-to-date. You want:
Eclipse for RCP and RAP developers
XPages SDK for Eclipse RCP (from OpenNTF)
XPages Debug Plugin (from OpenNTF - basically allows you to load the plugins to the Domino server dynamically, rather than exporting to an Update Site all the time)
XSP Starter Kit on OpenNTF is a good starting point for a plugin. There are various references to the library id, which has to be unique for your plugin. Basically, references to org.openntf.xsp.starter need changing to whatever you want to call your plugin. You're also best advised to remove what you don't need. I tend to work in a copy of the Starter, remove stuff, build and if there are errors with required classes (Activator.java obviously will be required and some others), then paste them back in from the Starter.
XPages OpenLog Logger is a good cross-reference, that was built from XPages Starter Kit. It's pretty much stripped down and you'll be able to see what had to be changed. A lot of the elements of the XSP Starter Kit correspond to Java classes you'll probably be familiar with from your XPages Java development.
GitHub etc tend to be used as source control, which is useful for working out what's changed from time to time.

standard d3 workflow and hosting solutions

I am new to d3.js and it seems like there are a lot of options when it comes to developing and hosting projects.
Options include:
bl.ocks.org
plnkr.co
jsfiddle
jsbin
vida.io
etc.
I can also run a web server with python for local development, but in my case, I am not able to host my projects locally.
bl.ocks.org is really popular, but I have run into many caching issues when using it to develop code (make a change, wait 5 mins, see the change).
At the moment, I was thinking that the best bet would be to develop locally then put the code in a gist and use bl.ocks.org to host it.
My question is:
Is this a fairly standard and sensible workflow for d3 and are there any other services out there that you recommend I should use instead of bl.ocks.org?
Develop locally. For most D3 work you don't even need a server running, since browsers will "serve" static html, javascript, json and csv over the file:// protocol (EDIT: except Chrome). This makes the development cycle simple, fast and easy.
Deploy with GitHub. If you're just serving static pages and not hosting anything else, it's the fastest way to get something up on the web. There are two good ways to do this:
Gist hosted, view on bl.ocks.org. This is great for little examples and one-off tricks. The best part of this is that it just works, no configuration necessary. Also it's neat to see the auto-generated gallery of your visualizations.
GitHub Pages. This is best for more significant projects, since you can completely customize the interface to your liking (and even use your own domain!). Just don't forget to put a "fork me" ribbon in the corner.
And please do post any neat visualizations you build to the gallery!

Maven site + search capabilities

Recently in our organisation we've decided to work with maven site plugin and maintain all the documentation about our project in the site generated by maven.
However I haven't found any way to add a search functionality, the only thing I've come across that some skins provide an integration with the google search engine, but I can't use it because we're running in our own network and there is no chance to make it 'indexable' from outside.
So, my question is whether someone can suggest a descent solution for this?
I thought about developing a kind of maven plugin that would run lucene and index everything by itself and then provide an API to use this search from within the site, but I hope I won't need to reinvent the wheel :) So any suggestion will be welcome here
Thanks in advance
Just an idea, you can try to use JavaScript based full-text search engine e.g. http://jssindex.sourceforge.net/
We are using constellio to index the published site on a schedule. That works well so far.
I've raised http://jira.codehaus.org/browse/MSKINS-88 to cover adding a generic search form to the fluido skin which we use to build our maven sites. Hopefully that'll be progressed and we can have the search form baked into the documentation.
I know this is an old question, but a very easy (and admittedly ugly) way to accomplish what you want is simply generating a PDF with the site contents and letting your users do the search on the PDF. The advantage over searching on the generated site is that any PDF reader will be able to search the whole document.
mvn pdf:pdf
If you cannot use Google Site Search you're dependent on local search implementations. Hence, you either need to build the index during the site build (and for it to be available as part of your site) or do both index and search in the browser.
Besides JSSindex which appears to be somewhat dated there's http://www.tipue.com/search/ which is based on jQuery.
Maven site plugin approach is not widely used. So there is nothing specific for indexing yet.
You should look at non-maven tools.

Multilanguage site in Joomla, specific page not loading modules

I've got a site built in Joomla, and it is using Joom!Fish for translating articles, which seems to work great.
However there's one page on my site, which in just one of the four languages currently active does not load two of my modules.
I've nailed this down to a SEF-urls problem, de-activating it in Joomla-admin fixes the issue, but I need to have SEF-urls.
Why is the SEF-url working on 3 of my languages, but on the fourth it seems to ignore the itemid parameter and not load my modules.
Using Joomla 1.5x, for SEF-urls I'm using the built-in solution, will perhaps using a SEF-plugin solve this?
Best Regards // Ninja
Fixed it by recreating articles menus, modules etc. That was connected to the broken page, and it started working. However it's prolly just a matter of time before the same problem will occur on a new page.
Seems to be an issue with SEF-urls and modules not really supporting it fully. JoomFish seems fairly bad at this.
So if someone else runs into this problem, try recreating everything thats connected to the problem, and hope nothing else will break.

Maven: Can I speed up mvn site?

Is there a quicker way to generate a site for maven for preview?
Background:
I'm using mvn site to generate a website which includes documentation for our project. I'm using the the apt format, which is simple, and very few mistakes are actually made, but I do want feedback after adding large amount of content so I don't have to spend too much time searching for syntax errors.
The problem is the site takes about 2 minutes to generate each time, and I would like quicker feedback then this for how the site looks and if I made any mistakes while typing up the docs. This isn't a huge issue but, the situation could certainly be improved.
Also, in order to help me out I'm using vim with syntax highlighting and if I need to get a quick preview on something there was a nice plug-in for eclipse that allows me to preview whether or not my apt is working correctly (of course, it's not the same as what is generated by maven, but it's close enough).
I'm open to any other suggestions, but generating a quick preview with maven would be the best option for productivity.
Configure the 'reporting' section to turn off what you don't want. Dependency analysis, for example, takes a long time. Look at the doc for the project-info-reports-plugin.

Resources