Skip to content

Instantly share code, notes, and snippets.

View manwithsteelnerves's full-sized avatar

IP manwithsteelnerves

  • www.voxelbusters.com
View GitHub Profile
private void OnEnable()
{
ReplayKitManager.DidRecordingStateChange += DidRecordingStateChange;
}
private void OnDisable()
{
ReplayKitManager.DidRecordingStateChange += DidRecordingStateChange;
}
@manwithsteelnerves
manwithsteelnerves / install-redis.sh
Last active July 29, 2020 06:19 — forked from clzola/install-redis.sh
Bash script for installing Redis on Ubuntu 16.04
#!/bin/bash
# Install the Build and Test Dependencies
apt-get update
apt-get install -y curl build-essential tcl
# Download and Extract the Source Code
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
webView.setOnTouchListener(new View.OnTouchListener()
{
@Override
public boolean onTouch(View v, MotionEvent event)
{
int actionEvent = event.getAction();
switch (actionEvent)
{
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_UP:
@manwithsteelnerves
manwithsteelnerves / KeyboardHelper.java
Created December 9, 2017 05:38
Webview Adjust Pan in Fullscreen Activity
package com.voxelbusters.nativeplugins.helpers;
import android.app.Activity;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import com.voxelbusters.nativeplugins.helpers.interfaces.IKeyboardListener;
public static bool Contains (this Rect _rect1, Rect _rect2)
{
if ((_rect1.position.x <= _rect2.position.x) &&
(_rect1.position.x + _rect1.size.x) >= (_rect2.position.x + _rect2.size.x) &&
(_rect1.position.y <= _rect2.position.y) &&
(_rect1.position.y + _rect1.size.y) >= (_rect2.position.y + _rect2.size.y))
{
return true;
}
else
Passing values as JSON
"SCORES_PER_TURN_ATTRIBUTE": "{\"SCORES\" : [1000,3000,6000]}"