Skip to content

Instantly share code, notes, and snippets.

@smits
smits / build_valgrind.sh
Last active June 7, 2020 06:45
Build and push valgrind for Android devices
#!/usr/bin/env bash
#set -x
function extract()
{
if [ -f "$1" ] ; then
case "$1" in
*.tar.bz2) tar xvjf "$1" ;;
*.tar.gz) tar xvzf "$1" ;;
@alphamu
alphamu / Android Privacy Policy Template
Created February 9, 2017 03:17
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
diff --git a/samples/sdk-video360/src/main/java/com/google/vr/sdk/samples/video360/MonoscopicView.java b/samples/sdk-video360/src/main/java/com/google/vr/sdk/samples/video360/MonoscopicView.java
index 19ebd03..cb1b577 100644
--- a/samples/sdk-video360/src/main/java/com/google/vr/sdk/samples/video360/MonoscopicView.java
+++ b/samples/sdk-video360/src/main/java/com/google/vr/sdk/samples/video360/MonoscopicView.java
@@ -30,8 +30,12 @@ import android.support.annotation.AnyThread;
import android.support.annotation.BinderThread;
import android.support.annotation.UiThread;
import android.util.AttributeSet;
+import android.view.Display;
import android.view.MotionEvent;
@jfuellert
jfuellert / ScrollableView.swift
Last active April 24, 2025 01:55
A scrollable SwiftUI view, UIScrollView wrapper. ScrollableView lets you read and write content offsets for scrollview in SwiftUI, with and without animations.
import SwiftUI
struct ScrollableView<Content: View>: UIViewControllerRepresentable, Equatable {
// MARK: - Coordinator
final class Coordinator: NSObject, UIScrollViewDelegate {
// MARK: - Properties
private let scrollView: UIScrollView
var offset: Binding<CGPoint>
@ABridoux
ABridoux / MatrixMixerNodeWrapper.swift
Last active November 18, 2023 18:20
Wrapper around an `AVAudioUnit` of type `kAudioUnitType_Mixer` and sub type `kAudioUnitSubType_MatrixMixer` for convenient usage.
import AVFoundation
// MARK: - MatrixMixerNodeWrapper
/// Wrapper around an audio unit node of type `kAudioUnitSubType_MatrixMixer` for convenience.
public final class MatrixMixerNodeWrapper {
// MARK: Properties
/// Matrix mixer to map input channels