Skip to content

Instantly share code, notes, and snippets.

Back to Android. Kotlin. Webdev. JS. Playing with new frameworks!!

Faisal rasak monsterbrain

Back to Android. Kotlin. Webdev. JS. Playing with new frameworks!!
View GitHub Profile
monsterbrain / custom-shape-layout-android.xml
Created May 23, 2019
Custom Layout - Rectangle with Oval Shape - Android
View custom-shape-layout-android.xml
<?xml version="1.0" encoding="utf-8"?>
monsterbrain /
Created Feb 7, 2019
Simple Code snippet to quickly add a loading dialog for android
// in gradle - use compile in old one
implementation 'com.afollestad.material-dialogs:core:'
// Field variable
MaterialDialog progressDialog;
progressDialog = new MaterialDialog.Builder(context)
.title("Loading something")
.progress(true, 0) // true for indeterminate
monsterbrain / iframe_to_image_conversion_javascript_js_html5.html
Created Feb 7, 2019
iframe is not supported by html2canvas. to convert iframe to image / base64, using iframe2image and html2canvas to save that image data.
View iframe_to_image_conversion_javascript_js_html5.html
<!DOCTYPE html>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Canvas to Image Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script src="html2canvas.js"></script>
View space_invaders_raylibgame.c
* raylib - sample game: space invaders
* Based on Sample game developed by Ian Eito, Albert Martos and Ramon Santamaria
* Modifed by Monster Brain ( - 2018
* This game has been created using raylib v1.3 (
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
monsterbrain / shuffle_unity.cs
Created May 17, 2017
Shuffle Array in Unity Code Snippet Script
View shuffle_unity.cs
void reshuffle(string[] texts)
// Knuth shuffle algorithm :: courtesy of Wikipedia :)
for (int t = 0; t < texts.Length; t++ )
string tmp = texts[t];
int r = Random.Range(t, texts.Length);
texts[t] = texts[r];
texts[r] = tmp;
monsterbrain / CanvasFaderScript.cs
Created May 16, 2017
A Simple Unity UI Canvas Fading In / Out C# Script. Useful for transitions.
View CanvasFaderScript.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
* A Simple Canvas Fader Script (Unity 5.6)
* Uses : Fade out or Fade In a UI Canvas. Not for transitioning a whole Scene with elements.
monsterbrain / failed to resolve com.hi5dev.box2d_pexml.txt
Last active May 16, 2017
failed to resolve com.hi5dev.box2d_pexml:box2d-pexml android studio LibGDX
View failed to resolve com.hi5dev.box2d_pexml.txt
Was getting this error. Tried searching.
But at last found that I put the repositaries link
maven { url "" }
in the buildscript {} rather than the allprojects {} section.
You can’t perform that action at this time.