Skip to content

Instantly share code, notes, and snippets.

{
"require": {
"league/csv": "^9.0",
"symfony/finder": "^5.4"
}
}

Docker Pulls SourceForge Downloads SourceForge Downloads

OrangeHRM Starter Application

OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures all the essential functionalities required for any enterprise. Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com/

OrangeHRM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

version: "3.3"
services:
orangehrm:
image: orangehrm/orangehrm:5.1
restart: unless-stopped
ports:
- "8200:80"
volumes:
- ./orangehrm/src/config:/var/www/html/src/config
@RajithaKumara
RajithaKumara / generate-doc-comment.md
Last active November 1, 2023 13:18
Generate PHP doc comment for zircote/swagger-php from OpenAPI json

Motivation

Convert PHP API doc source from APIDOC to swagger-php.

Steps

  • Generate OpenAPI definition from APIDOC doc comments
  • Generate swagger-php annotations using generate-doc-comment.php script.

https://github.com/orangehrm/orangehrm/blob/master/symfony/plugins/orangehrmPimPlugin/lib/form/EmployeeAttachmentForm.php#L43 replace 1000000 to 5242880

https://github.com/orangehrm/orangehrm/blob/master/symfony/plugins/orangehrmRecruitmentPlugin/lib/form/RecruitmentAttachmentForm.php#L82 replace 1024000 to 5242880

https://github.com/orangehrm/orangehrm/blob/master/symfony/plugins/orangehrmAdminPlugin/modules/admin/actions/saveJobTitleAction.class.php#L46 replace 1024000 to 5242880

https://github.com/orangehrm/orangehrm/blob/master/symfony/plugins/orangehrmRecruitmentPlugin/modules/recruitmentApply/actions/applyVacancyAction.class.php#L82 replace 1024000 to 5242880

https://github.com/orangehrm/orangehrm/blob/master/symfony/plugins/orangehrmAdminPlugin/modules/admin/actions/pimCsvImportAction.class.php#L40 replace 1024000 to 5242880

#include <stdlib.h>
#include <jni.h>
#include <libplatform/libplatform.h>
#include <v8.h>
//...
void runV8(JNIEnv *env, jobject instance, jobjectArray args) {
const char *path_to_snapshot = "";// Get path from args
const char *source_code = "";// Get source code from args
v8::V8::InitializeICU();
v8::V8::InitializeExternalStartupData(path_to_snapshot);
@RajithaKumara
RajithaKumara / LocalServerSocket.md
Created September 20, 2019 13:45
Android create Unix domain socket by bound file descriptor

Android create Unix domain socket by bound file descriptor

Android provide LocalServerSocket and LocalSocket to create Unix domain sockets for local interprocess communication (IPC). Unix socket address can behave in three types[1],

  • pathname
  • unnamed
  • abstract

LocalServerSocket provide two public constructors for create socket in Linux abstract namespace[2] and create socket using file descriptor that's already been created and bound[3].

Create LocalServerSocket using [FileDescriptor](https://docs.oracle.com/javase/7/docs/api/j

@RajithaKumara
RajithaKumara / global_state.js
Created April 23, 2019 11:24
Access Node.js global varibale from Next.js page
'use strict';
let globalVar = null;
module.exports.get = function () {
return globalVar;
};
module.exports.set = function (v) {
globalVar = v;
@RajithaKumara
RajithaKumara / Symfony-4.1-RepositoryTestCase.php
Last active November 15, 2018 10:26
Repository testing for DAO layer. Boot the kernel is required to get a valid database connection.
<?php
namespace App\Tests\Repository;
use App\Entity\User;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
class UserRepositoryTest extends KernelTestCase
{
/**