Skip to content

Instantly share code, notes, and snippets.

View drajathasan's full-sized avatar

Drajat Hasan drajathasan

View GitHub Profile
@drajathasan
drajathasan / chat-frontend.js
Created March 11, 2020 13:46 — forked from martinsik/chat-frontend.js
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
@drajathasan
drajathasan / lbc_installer.php
Last active June 18, 2021 06:55
LBC Installer
<?php
/**
* @author Drajat Hasan
* @email drajathasan20@gmail.com
* @create date 2020-08-15 08:39:32
* @modify date 2021-06-18 08:39:32
* @license GPL v3
*/
// Source https://subinsb.com/php-download-extract-zip-archives/
@drajathasan
drajathasan / Plugins SLiMS
Last active February 13, 2021 05:15
Modifikasi agar daftar Plugins di SLiMS dapat terlihat semua. Simpan file ini di folder lib/ (Jangan lupa membackup file sebelumnya)
<?php
/**
* @Created by : Waris Agung Widodo (ido.alit@gmail.com)
* @Date : 05/11/20 13.53
* @File name : Plugins.php
*/
namespace SLiMS;
@drajathasan
drajathasan / List Custom Plugins
Created February 13, 2021 05:14
File agar list plugins custom dapat muncul di user non super admin. Download file ini lalu simpan di folder lib/ (Jangan lupa backup file sebelumnya)
<?php
/**
* module class
* Application modules related class
*
* Copyright (C) 2010 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
@drajathasan
drajathasan / index.php
Created March 11, 2021 07:16
File label barcode bawaan SLiMS 9.3.1 yang telah dimodifikasi agar muncul warnanya. Cara pasang nya 1. Download skrip ini lalu letakan di folder plugins/label_barcode 2. Jika plugin ini belum diaktifkan aktifkan pada modul system, di menu plugins, lalu klik panel pada plugins dengan nama label barcode yang ada tulisan Ido Alit.
<?php
/**
* @Created by : Waris Agung Widodo (ido.alit@gmail.com)
* @Date : 06/11/20 00.56
* @File name : index.php
*/
defined('INDEX_AUTH') OR die('Direct access not allowed!');
// IP based access limitation
@drajathasan
drajathasan / fll_installer.php
Last active June 18, 2021 06:55
FLL installer
<?php
/**
* @author Drajat Hasan
* @email drajathasan20@gmail.com
* @create date 2020-08-15 08:39:32
* @modify date 2021-06-18 08:39:32
* @license GPL v3
*/
// Source https://subinsb.com/php-download-extract-zip-archives/
@drajathasan
drajathasan / myRegex
Created April 11, 2021 00:35
Regex at 11/04/2021
# Search string before string ":"
.+?(?=:)
# Search string only some range character e.g: a to z
^[a-z]*$
# Search bracket
{+\w+}
// open your terminal
1. Download source from official website
2. Extract it into some folder
3. Do this command
cd source_of_postgres_dir
./configure
make
su
make install
adduser postgres
@drajathasan
drajathasan / rrmdir.php
Created June 19, 2021 08:46 — forked from jmwebservices/rrmdir.php
PHP recursive rmdir
<?php
/**
* Recursively empty and delete a directory
*
* @param string $path
* @ref https://gist.github.com/jmwebservices/986d9b975eb4deafcb5e2415665f8877
*/
function rrmdir( string $path ) : void
{
@drajathasan
drajathasan / docker-compose.yml
Created July 14, 2021 15:22
Docker Compose for PHP5+Mssql Driver
version: "3.9"
services:
web:
image: drajathasan/debian-php5-mssql
container_name: 'app1'
volumes:
- ./app:/var/www/html/
ports:
- "8000:80"