Skip to content

Instantly share code, notes, and snippets.

Robert RobertApikyan

View GitHub Profile
View GateWayApiInterface.kt
package com.cargoo.android.api.apiClient.retrofit.services
import com.cargoo.android.models.*
import com.cargoo.android.models.chartWidget.ChartWidgetDetails
import com.cargoo.android.models.chartWidget.CompanyWidget
import com.cargoo.android.models.shipment.ShipmentDetailsResponse
import com.cargoo.android.models.shipment.ShipmentResponse
import com.cargoo.android.requestBodies.ApprovedCompanyId
import com.cargoo.android.requestBodies.CompanySingleAccessBody
import com.cargoo.android.requestBodies.EmptySearchBody
View gist:4dd9afdd1f8e2e841f5eb56efa169ca3
{
"homeTab":true,
"userProfile":true,
"userTimeOffs":true,
"userProjects":true,
"userTasks":true,
"userInterviews":true,
"userTimeOffsCalendar":true,
"userContacts":true,
"birthdays":true,
View gist:38891559a0bb62fd963e6d783254b804
curl -X GET \
'https://eng-dev.systechcloud.net/api/itemvalidate/%2801%2901905061302409%2821%29100000?format=json' \
-H 'Accept: */*' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Authorization: Basic SGlyZW5AZW5nX2RldjpIaXJlbjEyMyE=' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/json' \
-H 'Cookie: csrftoken=tl2JMphWG199CPiYYDYZhBlos4XWHLwe; sessionid=h2duvkl9rw0fyby6r8j521imzdasqvpo' \
-H 'Postman-Token: 8bb9e52a-c717-4232-bdf7-4a24cb3198ec,38fadf03-f2ed-4cb4-b3d7-bde4c34029a4' \
View gist:f0fafe7e58c03a174774edfc87faae5b
public class Test {
public static void main(String[] args) {
BashRunner.run("git help");
}
public static class BashRunner {
private static final Logger log = Logger.getLogger(BashRunner.class.getName());
public static void run(String comand) {
View gist:d256f77c33e25b36498550faf5babfb7
public static void runProcess(String cmd) {
ProcessBuilder processBuilder = new ProcessBuilder();
String command = "git help";
processBuilder.command("cmd.exe", "/c", command);
try {
View gist:bc59263e04a62a980cc88badc2687501
public static void runProcess(String cmd) {
ProcessBuilder processBuilder = new ProcessBuilder();
String cmdCode = "~/vendor/bin/terminus remote:drush mentorcliq-americamentors.jenkins -- scr scripts/check-self-matching-requests.php -- \"2019-10-27 00:18:54.86\"";
processBuilder.command("C:\\Program Files\\Git\\git-bash.exe", cmdCode);
try {
Process process = processBuilder.start();
View gist:9684bd7fad4eed7773d568fb620a92b2
<head>
<style type="text/css" media="print">
@page{
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
margin-bottom: 0px;
padding:0px;
}
View Permissions map
[
{
"key":"home_tab",
"isEnabled":true,
"items":[
{
"key":"user_profile",
"isEnabled":true,
"items":[
View gist:65f0a2b9bbee82cc1e415e9bdf3dabb0
{ companies ->
val ac = mutableListOf<Company.UserAccessViewModel>()
for (company in companies) {
val status = UserManegmentCompanyStatus.firstOrUndefined(company.approvalStatus)
val hasAccess = userCompanyList.indexOfFirst { it.id == company.id }.isNotUndefined
if (status == UserManegmentCompanyStatus.APPROVED || (status == UserManegmentCompanyStatus.WAITING && hasAccess)) {
ac.add(Company.UserAccessViewModel(company, hasAccess))
}
View gist:ab4b07478b851e49d3d5f033976d6ed5
{
"error": {
"code": 1018,
"displayMessage": "An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = TimeOffsMService (ReflectionActivator), Services = [Raiser.Services.ITimeOffsMService], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IEmployeeProvider (DelegateActivator), Services = [Raiser.Services.IEmployeeProvider], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Invalid column name 'Extension'. (See inner exception for details.) (See inner exception for details.)",
"internalMessage": null
},
"status": 1,
"message": null
}
You can’t perform that action at this time.