Skip to content

Instantly share code, notes, and snippets.

View mukaschultze's full-sized avatar
¯\_(ツ)_/¯

Samuel Schultze mukaschultze

¯\_(ツ)_/¯
View GitHub Profile
@mukaschultze
mukaschultze / crypto.ts
Created November 21, 2023 18:46
NativeScript Polyfiils
import { isAndroid } from '@nativescript/core';
class TypeMismatchError extends Error {}
class QuotaExceededError extends Error {}
/**
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Uint8ClampedArray} array
*/
function getRandomValues(array) {
if (
@mukaschultze
mukaschultze / max-line.directive.ts
Created January 22, 2024 18:53
Max line directive NativeScript
import { Directive, ElementRef, Input, OnInit, OnChanges } from '@angular/core';
import { Label } from '@nativescript/core';
@Directive({ selector: 'Label[maxLines]' })
export class LabelMaxLinesDirective implements OnInit, OnChanges {
constructor(private el: ElementRef) {}
@Input() public maxLines = 1;
public get nativeView(): Label {
@mukaschultze
mukaschultze / discord.sh
Created May 15, 2024 12:23
Update discord on manjaro
git clone https://gitlab.archlinux.org/archlinux/packaging/packages/discord.git /tmp/discord
cd /tmp/discord
PACMAN=yay makepkg -si --skipinteg