Skip to content

Instantly share code, notes, and snippets.

View drajathasan's full-sized avatar

Drajat Hasan drajathasan

View GitHub Profile
<?php
/**
*
* Copyright (C) 2007,2008 Arie Nugraha (dicarve@yahoo.com)
* Modified for Excel output (C) 2010 by Wardiyono (wynerst@gmail.com)
*
* This program 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.
'use strict'
class routeGroup
{
constructor(routerInstance)
{
this.routerInstance = routerInstance
}
set(arrayMethod)
@drajathasan
drajathasan / biblio_list_template.php
Last active October 8, 2021 00:15
Modifikasi daftar biblio dengan menambahkan tombol ebook
<?php
/**
* Template for Biblio List
* name of memberID text field must be: memberID
* name of institution text field must be: institution
*
* Copyright (C) 2015 Arie Nugraha (dicarve@gmail.com)
* Create by Eddy Subratha (eddy.subratha@slims.web.id)
*
* Slims 8 (Akasia)
version: "3.7"
services:
msearch:
image: getmeili/meilisearch:v0.27.2
container_name: meilisearch
ports:
- "7700:7700"
environment:
- MEILI_MASTER_KEY=yourkey
- MEILI_NO_ANALYTICS=true
<?php
/**
* Copyright (C) 2009 Arie Nugraha (dicarve@yahoo.com)
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@drajathasan
drajathasan / OAI PMH SLiMS Reader
Created January 27, 2023 07:15
Consume OAI PMH result in SLiMS
$modsxml = Client::get('https://slims-online/oai2.php?verb=ListRecords&metadataPrefix=oai_dc')->getContent();
$xml = @new SimpleXMLElement($modsxml);
foreach ($xml->ListRecords->record as $record) {
$data = $record->metadata->children('oai_dc', 1)->dc->children('dc', 1);
dump($record->asXML(), $record->metadata->children('oai_dc', 1)->dc->children('dc', 1));
break;
}
exit;
<!DOCTYPE html>
<html>
<head>
<title>Calculator</title>
<style>
#number > button {
width: 31%;
}
.operator > button {
@drajathasan
drajathasan / vscode-ext.list
Last active February 23, 2024 04:39
My Favorite VSCode Extension
code --install-extension CoffeeIO.php-docblocker-coffeeio
code --install-extension edwardhjp.vscode-author-generator
code --install-extension formulahendry.auto-close-tag
code --install-extension adpyke.codesnap
code --install-extension shd101wyy.markdown-preview-enhanced
code --install-extension rangav.vscode-thunder-client
code --install-extension Vue.volar
version: "3.7"
services:
db8:
image: mysql:8.0.32
container_name: db8
env_file:
- db_default.env
command: --sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION --max_allowed_packet=1024M --log_bin_trust_function_creators=1
volumes:
- "./dbdata8:/var/lib/mysql"
@drajathasan
drajathasan / PluginMaker.php
Created September 30, 2023 07:52
slims-plugin-maker.console
<?php
namespace Commands;
use SLiMS\Cli\Command;
use SLiMS\Filesystems\Storage;
class PluginMaker extends Command
{
/**
* Signature is combination of command name