How can I pull the list a user's project through Gitlab API by Laravel? - laravel

I'm very new at Gitlab API. I'm using it for my project.
Well, I have one local Gitlab server with many projects (Or maybe it's call "repository") in there.
So, I want to use Laravel to pull some parameter that is list a user's projects by using Gitlab API. Honestly, I have no idea to start this work.
I already read the Gitlab documentation but still can't get it clearly. What I want is the image as below. Could you guys guide me to get this? Thank you very much.
This is what I want.

Here is the GitLab api to read the projects
You can do file-get-contents to read something from api
So, finally as per your gitlab configuration you can do like this to read all the projects
$url = "http://yoururl/api/v4/projects";
$homepage = file_get_contents($url);
echo $homepage;
Hope this helps you.

Related

Passing code from CodePipeline to PythonFunction

I'm trying to create a CDK app that will deploy a pipeline-stack and a lambda-stack. Similar to the tutorial here. I'm trying to implement a basic CI/CD application that is triggered with every push to a Github Enterprise Repo.
I chose to use PythonFunction from (#aws-cdk/aws-lambda-python) instead of function from #aws-cdk/aws-lambda because PythonFunction builds the dependencies from requirements.txt. I have various lambdas that use different packages (like awswrangler, pandas, requests, etc.).
But, PythonFunction does not support CfnParametersCode (Where the code is passed through CDK instead of being read from an asset).
What other option do I have to pass my code from GithubEnterprise to
the PythonFunction?
If function from #aws-cdk/aws-lambda is the only option I have, how
can I include the packages from requirements.txt
This does seem like an option for #aws-cdl/aws-lambda, but how would I pass my code from Github? This example relates to building from asset code.
I apologize if I'm missing something obvious, I just started working with AWS CDK last week.
First of all I would recommend to take a look at pipelines.CdkPipeline which is able to deal with Assets. That means you can directly use lambda.Code.from_asset instead of overriding CfnParametersCode in the Pipeline.
Regarding your other question, you can deal with the requirements by installing them into your lambda folder during the build step with: pip install -r requirements.txt -t .
CfnParametersCode gives you the ability to upload your code from an S3 file.
You can do the same via lambda.Code.fromBucket.
Taking your link from the third point (https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/aws-lambda#bundling-asset-code) You just need to use lambda.Code.fromBucket instead of code: lambda.Code.fromAsset. Docs can be found here: https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/aws-lambda

Laravel + Angular2-seed integration

I am trying to integrate angular-seed into an empty laravel application.
It seems that, by default, angular-seed looks for node_modules in the root level.
I have tried modifying some parameters in the config files, but there is always something that ends up breaking.
Does anybody have experience solving this?
Thank you
Here is a repo for a with angular2 + laravel, you should be able to compare files and find the right configuration
https://github.com/moff/laravel5-angular2

How to test sending email in Laravel 5 using Behat?

I've just started learning to work with Behat in Laravel 5 and wonder how I could verify email sending. I tried this tutorial but it did not work (maybe it's out of date?). I also tried googling but couldn't find many sources. If you could show me how to achieve this, or direct me to a nice tutorial, I'd be really grateful.
Thanks!
I personally use mailtrap instead of mocking. I find it very usefull.
If you have set all the requirements, you can fetch your last sent mail by this method:
$lastEmail = $this->fetchInbox()[0];
Then you can retrieve let's say the title like this:
$subject = $lastEmail['subject'];
For a nice and clean tutorial watch: https://laracasts.com/lessons/trapping-your-email
I hope it helps!

How does one get all the artifacts as a zip using TeamCity Rest API?

The Docs show this
/repository/downloadAll/BUILD_TYPE_ID/BUILD_SPECIFICATION
for getting all of your artifacts as a zip file, but that isn't using the REST API. Is there a way in the REST API do do the same thing? The Docs seem to indicate that the repository links are only there for backwards compatibility.
You can use this URL, it works for me:
http://<TeamcityUrl>/httpAuth/app/rest/builds/id:<BuildId>/artifacts/archived
I use TeamCity 9.
From the documentation: http://confluence.jetbrains.net/display/TW/REST+API+Plugin#RESTAPIPlugin-buildartifacts
Artifacts:
GET <TeamcityUrl>/httpAuth/app/rest/builds/<buildLocator>/artifacts/files/<artifact relative name>
If you download the artifacts from within a TeamCity build, consider using teamcity.auth.userId/teamcity.auth.password system properties as credentials for the download artifacts request: this way TeamCity will have a way to record that one build used artifacts of another and will display that on build's Dependencies tab.
have you tried this?
I'm not sure it's documented, but it works.
http://teamcity-url/downloadArtifacts.html?buildId=216886
If you are using it from .NET you may use the following code:
List<string> downloadedFiles = new RemoteTc()
.Connect(a => a.ToHost("tc").AsGuest())
.DownloadArtifacts(123, #"C:\DownloadedArtifacts");
The above code uses FluentTc library

Linkedin+Codeigniter : linkedin status update using codeigniter

could any one guide me on how can I update status on linkedin using codeigniter?
Any help appreciated thanks!
I implemented this library into CI to make sure a user could log in with his LinkedIn profile. Maybe you can also update the status of a user.
http://code.google.com/p/simple-linkedinphp/
Implementing it in CI is pretty easy if you know your way around in CI.
I really like it when people write libraries for others to use and the code is commented/well thought out/well structured and is easy to follow.
I tried the other examples, but settled on this one.
http://blog.justni.com/posting-to-linkedin-from-php-and-codeigniter/
Edit:
Having banged my head for a long time on the POS code of Sudhir and the code above. Yes I can change my opinion, because when I started to work on it, it just doesn't work!.
Although I am new to CI, I managed to do the same as P.T and implemented the lib into CI.
The simple-linkedinphp class works like a charm.
I can now authorise an app, authenticate, get profile details and even post to linkedin.
I even posted a comment on Sundir's blog that it doesn't work and he deleted the comment! Stay away, well away if you don't want any headaches!

Resources