Best way to write a Gitlab module - gitlab

I would like to extend Gitlab, mainly writing a custom dashboard. I cannot find any documentation on the 'proper/best/better' way to do this. Can someone point me in the right direction. I already tried searching

There is no way of doing that except by forking GitLab.
The only way of doing those things without forking (and thus merging afterwards...) is the API (since it is guaranteed to be stable) but it is probably overkill for your application.

Related

Multiple projects with shared azure arm templates

This is a fun one.
I am new to deploying resources using ARM templates, but I have managed (with some difficulty!) to get them working to a satisfactory degree.
I have a question about best practices though and can't seem to find any articles on it.
If I have 2 projects that share a resource (in this case an SQL server), is it best practice to have that said resource in both templates or should there be some sort of shared project that uses first come first serve when building and deploying?
Currently I use the former.
The reason I bring this up, is I can imagine that doing it my way will eventually cause some issues, because if I change one template, then I have to change them all.
I usually create everything in separate templates and dont like to reuse templates because it really brings nothing to the table. I can copy\paste the same snippet into 2\3\10 different templates its no big deal, I can use mass find\replace to amend something. although, I've never had the case where some certain resource would needed to be changed in exactly the same fashion across all the existing projects. and usually projects have at least something in common (storage\vm\public ips\etc) and usually they do require different way to configure them, so I'd say dont try to reuse templates. little gain, but might hurt you in future a lot.
I would think of this in terms of "lifecycle". I.e. does the SQL Server have the same lifecycle as the databases? It sounds like it does not... which would suggest not only would it be a separate template, but you would not deploy that template each time you deploy a database.
ARM templates are code so follow best practices you use for other code (where sharing and reuse have their place).
When I am playing around and kicking tires I usually end up duplicating things like you're doing now, but once I make things "production ready" I'll clean up those things as it will eventually cause problems like you're thinking. Depends a little on your workflow, but code is code...

Cron with REST interface?

I need a cron-like tool that supports REST API. It should have all the features of cron + the ability to read (and maybe even write) new cron rules.
I've scoured the interwebs but found nothing mature. and yes, I realize that REST interface for cron could be a serious security issue.
minicron does not offer REST API at the moment
chronos is way too overblown for my purposes (its built on top of ZooKeeper and Mesos)
this rest-cron project is abandoned and only partially implemented.
fcron lacks what I need but is opensource and could maybe be extended, but its c code which would be a pain.
jobber is a go-based cron-like, which would be easier to modify.
Still I was hoping for an out of the box solution. Any ideas?
To manage my infrastructure, I use EasyCron - https://www.easycron.com/document - The API isn't the most sophisticated, but gives me more control.
I've been using recurry for this reason (nodejs).

how stable is AirBnB node.js rendr?

I wanted to know if anyone has been using AirBnB Rendr and is it stable and ok to use in commercial projects or is it still changing a lot?
I'm developing a website which can run both client and server based, this mean I need to be able to render pages and widgets server and client based.
The server is running Node.js, dust.js and has custom server based code to render the pages and widgets on the server side. I need to pick how to handle it on the client side.
Naturally I want to try and not repeat code, but obviously the client is different I can:
Keep my current page based server rendering and develop custom
client side code.
Use backbone.js on client side and keep my server based code the
same.
Use AirBnB rendr that is based on Node.js and backbone to use the
same code on client and o server. AirBnB Rendr Library
I like the 3rd idea very much, but I'm looking for some input from you guys.
Has anyone used it? any experience with it in terms of stability and/or how often their api changes etc?
I've just started playing around with Rendr. If I ignore the learning curve and oboarding friction, I like it a lot and I plan to write my next large production app using Rendr.
Unfortunately, as bababa listed above, the documentation needs a lot of work. There is an explanation of how Rendr works in its README and the example app's README but beyond that you'll need to source dive in order to figure out how the gears are turning. Currently, there is no forum for questions (other than stack overflow :D) and I've had a hard time figuring out its idioms on my own.
Despite all the struggles, I finally see the light and I'm starting to understand why Rendr is so powerful.
tl;dr - If you're willing to source dive and figure out your own workflow, I would suggest using Rendr. Otherwise, I would recommend going old school by writing a traditional client app with a more mature library. (is it too early to say that? =X)
Well given AirBnb is a successful commercial enterprise, there's some validation that the library works well enough for them. This question is probably best answered by watching their github commit log for breaking changes. Given backbone is 1.0 and essentially stable at this point, rendr will probably quickly stabilize, but honestly your fear of instability is probably unjustified. I think rendr looks compelling and although my current project is using a very similar home-grown solution, I would consider using rendr in a future project or even porting our code to rendr. "Stability" per say is much less important to the web development community compared to other situations like packaged or embedded software.
I used (tried to use) and Rendr on a project and gave up. There are just to many limitations (currently) and the lack of documentation doesn't help. I ended up need to rewrite the source code to accomplish some things I would consider trivial with other frameworks, such as passing multiple collections to a view. It just wasn't possible (at the time I used it) and that was a deal breaker. Not being able to pass a collection of categories and results to a page was to much of a limitation.
I have no doubt it will eventually be ready for production use, but right now I would say unless you are an engineer at AirBnb and know how to hack the source then no, it's not ready.
If you really want to know if it will work for your needs, take a look at the issue list on github. That will give you a good idea where the projects at.

TortioseSVN- How to share repsoitory between two disconneted computers?

Scenario: 2 developers working on the same project (VS2010, C#, MVC3, WinXP) on seperate stand alone computers. Due to IA restriction (DOD) we are NOT allowed to connect these two computers in any way. The only way we are allowed to pass data between computers is via a CD-R/DVD-R disk. We need to be able to share a SVN repository for the code we are writing. I'm trying to figure out what the best way to do this would be.
Will this scenario even work? What the best workflow to use? I would appreciate any guidance or suggestions on the best way to do this.
Mark Buckley
putrtek#gmail.com
It sounds to me that you would be better off using distributed source control, such as Mercurial or Git for this project. SVN makes it exceptionally hard to merge, and distributed source control would make it so that you just have to pass ChangeSets back and forth.
Also, distributed source control houses a repository on each system, which is what you would have to do in this situation anyways.
This book should help you with most things Mercurial-related.
This Link explains how to pull new ChangeSets into your repository.
In your situation I would propose the following scenario: setup and maintain SVN repository on the one selected PC (let's say the most reliable one), the other members pass CD-R's with patches when they finish part of work, then all patches are integrated in that SVN repo and for each members own patches are created to have similar code on each PC. I know, this sounds awkward, but maybe the best option in this case and operations with patches can be automatized.
From a design perspective I think the code architecture needs to be good with clear separation of modules, less coupled codes, follow strict OOP, reduce code dependency and I guess in that way two people can easily work without much interaction... do plan your integration and do have your code / class signatures defined before hand if possible.

Resources To Build a Framework

I'm thinking in create a framework, a little project with my friends, just to loose some time trying to build something, but we don't know where and how to start, then we are needing to know two things:
Which languages is possible to do this?
Where we can found some resources to begin(tutorials, sources...)?
All types of help are very welcome. Thanks.
You can use any language (that provides a mechanism for creating libraries) to build a framework.
Learn the language and development platform of choice, first. Creating a framework is just creating a library that provides a useful foundation for people.
Just trying to "Set out to build a framework" is probably not going to be too successful, however. Typically, a successful project, especially one being done for fun, is one that fills some need... Think about what you are developing, or what you want to develop. Create a project that is exciting, fun, and useful for you.
If, in the process, your project gets large, you can always pull out the building blocks and turn it into a framework for other people to use, as well.
You can create a framework in just about any language in existence, with a few common sense exceptions (such as a web server in Javascript). The most important thing to remember is that in order to make code reusable, you have to first make it usable. Your framework really has to make something simpler than doing it the original way.
Just curious, what kind of framework are you thinking about making?
If you don't know where to start, what to do or how to do it, why not join an open source project of your liking? It'll be a great starting point. You'll have the chance to observe how to design frameworks, what are the challenges, practices for writing code, and answer a lot of other questions along the way.
Then, when you'll have a concrete idea about building something, you'll already have a lot of useful knowledge on how to make it successful.

Resources