Skip to content

Instantly share code, notes, and snippets.

View gayanW's full-sized avatar
Green squares can't trick me

Gayan Weerakutti gayanW

Green squares can't trick me
View GitHub Profile
@gayanW
gayanW / game-res
Last active January 30, 2019 18:45
Resources
Design Ideas
Black Holes:
https://assetstore.unity.com/packages/2d/textures-materials/2d-black-hole-vortex-15027
https://www.youtube.com/watch?v=fOWHA07HxVs
http://timothycourtney.io/sprite-sheets/black-hole-warp.php
Space
https://www.pinterest.com/gayansajith/space/
UI Framework Error
Root Error
java.lang.IllegalStateException: Logged-in user is not a Provider
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
{
"swagger": "2.0",
"info": {
"description": "OpenMRS RESTful API specification",
"version": "2.0.5",
"title": "OpenMRS API Docs",
"contact": {
"url": "http://openmrs.org"
},
"license": {
{
"swagger" : "2.0",
"info" : {
"version" : "1.0.0",
"title" : "Swagger WebServices REST"
},
"schemes" : [ "http" ],
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"securityDefinitions" : {
private String getResourceName(DelegatingResourceHandler resourceHandler, boolean getParent) {
Resource annotation = resourceHandler.getClass().getAnnotation(Resource.class);
String resourceName = null;
if (annotation != null) {
// top level resource
resourceName = annotation.name();
} else {
// sub resource
SubResource subResourceAnnotation = resourceHandler.getClass().getAnnotation(SubResource.class);
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openmrs.module</groupId>
<artifactId>webservices.rest</artifactId>
<version>2.20.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Rest Web Services</name>
<description>Parent project for the Rest Web Services Module</description>
#!/bin/bash
if [ ! -f /etc/apt/sources.list.d/jessie-backports.list ]; then
echo "added by gayanw" > /etc/apt/sources.list.d/jessie-backports.list
echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
fi
# install openjdk-8
sudo apt-get update
sudo apt-get install -t jessie-backports openjdk-8-jdk
@gayanW
gayanW / run.sh
Last active May 1, 2017 05:33
Helper script run UUF server distribution
#!/bin/bash
# Helper script to run UUF server distribution
# when it is already being extracted
# Put this file in $UUF_SERVER/product directory
# Name of the built distribution archive (without extension)
zip_name=wso2uuf-1.0.0-m14
set -x
./target/$zip_name/bin/carbon.sh -Ddevmode $1 $2
@gayanW
gayanW / extract_run.sh
Last active May 1, 2017 05:26
Helper script to extract and run UUF server distribution
#!/bin/bash
# Helper script to extract and run UUF server distribution
# Put this file in $UUF_SERVER/product directory
# Name of the built distribution archive (without extension)
zip_name=wso2uuf-1.0.0-m14
set -x
rm -r target/wso2uuf-1.0.0-m14
cd target && unzip $zip_name.zip && chmod +x ./$zip_name/bin/carbon.sh