Skip to content

Instantly share code, notes, and snippets.

View Nanra's full-sized avatar
:octocat:
Code & Learn Day by Day 😃

Nanra Sukedy Nanra

:octocat:
Code & Learn Day by Day 😃
View GitHub Profile
class FirebaseNotifications {
FirebaseMessaging _firebaseMessaging;
void setUpFirebase() {
_firebaseMessaging = FirebaseMessaging();
firebaseCloudMessaging_Listeners();
}
void firebaseCloudMessaging_Listeners() {
@Nanra
Nanra / vanilla-js-cheatsheet.md
Created November 30, 2021 04:58 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
Add this within the Context xml element of your $CATALINA_BASE/conf/context.xml:
<!-- The default value is 10240 kbytes, even when not added to context.xml.
So increase it high enough, until the problem disappears, for example set it to
a value 5 times as high: 51200. -->
<Resources cacheMaxSize="51200" />
@Nanra
Nanra / nginx-tuning.md
Created September 7, 2021 03:18 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

## Hospital 1
{
"city": "Bandung",
"fhirUrl": "http://192.168.10.118:8080/hapi-fhir-jpaserver/fhir/Organization/663c3fd3-650e-402e-91ef-130baeb4c269",
"hospitalCode": "3273052",
"hospitalName": "RS Umum Immanuel Bandung",
"fingerprint": " ",
"registerBy": "Admin"
}
$ wget https://services.gradle.org/distributions/gradle-
6.3-bin.zip -P /tmp –quiet
$ sudo unzip -q /tmp/gradle-6.3-bin.zip -d /opt && rm /
tmp/gradle-6.3-bin.zip
$ sudo ln -s /opt/gradle-6.3/bin/gradle /usr/bin
// source: http://stackoverflow.com/questions/16491758/remove-objects-from-array-by-object-property
// source: https://gist.github.com/scottopolis/6e35cf0d53bae81e6161662e6374da04
// We have an array of objects, we want to remove one object using only the id property
var fruits = [{id:11, name:'Apple', color:'red'}, {id:12, name:'Mangosteen', color:'black'}, {id:13, name:'Banana', color:'yellow'}];
// Get index of object with id = 12
var removeAtIndex = fruits.map(function(item) { return item.id; }).indexOf(12);
// remove object
const fhirUrlSplitted = patientRequestBody.fhirUrl.split("/");
const fhirId = fhirUrlSplitted[fhirUrlSplitted.length-1] === "" ? fhirUrlSplitted[fhirUrlSplitted.length-2] : fhirUrlSplitted[fhirUrlSplitted.length-1];
Regex Form Remove "Get Data" String:
\W"Cannot Get(.*)"\s*(,*)
Regex Form Remove "Cannot Save" String:
\W"Cannot Save Data(.*)"\s*(,*)
1. Weekly Meeting
2. Update Documentation FHIR DIP Server
3. Create base project Afya Hospital Member
4. Create new repository Afya Hospital Member
5. Deployed on UAT & SIT Chubb Server
6. Update documentation explore Instamed Blockchain