Skip to content

Instantly share code, notes, and snippets.

@bradrice
bradrice / package
Created March 11, 2025 18:12
package.json-3-11-25
{
"description": "Tooling U Class Player",
"license": "private",
"readme": "NativeScript Application",
"repository": "https://github.com/toolingudev/classappnativescript.git",
"name": "class2tns",
"version": "2.0.0",
"author": "bradrice",
"main": "./app/main.ts",
"scripts": {
@bradrice
bradrice / my.modal-context.ts
Last active June 11, 2024 10:49
my-modal-component
import { Page } from '@nativescript/core';
import { ModalDialogParams } from "@nativescript/angular";
import { MyModalContext } from '../../models/my.modal-context';
export class MyModalComponentBase<T, R> {
protected modalContext: MyModalContext<T, R>;
protected closeCallback: (...args: any[])=> any;
public get title() {
@bradrice
bradrice / ios-debug-error
Created June 3, 2024 14:12
ios debug error
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Incident Identifier: 219A8158-C298-4ADE-9BBD-AC0CB041EFE7
CrashReporter Key: 00E11DD6-1A90-6DBC-BC3E-A786161C87F9
Hardware Model: Mac14,7
Process: classappnativescript [44589]
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/07C239CB-46E6-4B82-896B-8445DCA4EFA3/data/Containers/Bundle/Application/F17006C8-9C08-43DF-BE65-EFE2AB827288/classappnativescript.app/classappnativescript
Identifier: com.toolingu.class2tns
@bradrice
bradrice / .txt
Created May 10, 2024 18:30
Assertion failure
====== Assertion failed ======
Native stack trace:
1 0x1050b135c tns::Assert(bool, v8::Isolate*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) + 164
2 0x1050740c0 tns::ArgConverter::Invoke(v8::Local<v8::Context>, objc_class*, v8::Local<v8::Object>, tns::V8Args&, tns::MethodMeta const*, bool) + 112
3 0x105096fc0 tns::MetadataBuilder::InvokeMethod(v8::Local<v8::Context>, tns::MethodMeta const*, v8::Local<v8::Object>, tns::V8Args&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool) + 88
4 0x1050962f4 tns::MetadataBuilder::MethodCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 308
5 0x1051b6a24 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 276
6 0x1051b6060 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::intern
@bradrice
bradrice / gist:7953bb75bd5e802115d6cde94db4ba64
Created May 3, 2024 15:22
gyp error when installing the latest nativescript
brice@Brads-MacBook-Pro classappnativescript % npm install -g nativescript@latest
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm ERR! code 1
npm ERR! path /Users/brice/.nvm/versions/node/v20.12.2/lib/node_modules/nativescript/node_modules/fsevents
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
Searching for devices...
Copying template files...
Platform android successfully added. v8.7.0
Preparing project...
webpack is watching the files...
assets by path assets/ 246 KiB
assets by path assets/data/ 176 KiB 28 assets
assets by path assets/img/ 43.1 KiB 8 assets
asset assets/css/iconmoon.css 26.9 KiB [emitted] [from: app/assets/css/iconmoon.css] [copied]
assets by path fonts/ 6.02 MiB
@bradrice
bradrice / Player template
Created March 6, 2024 18:58
Nativescript player template
<DockLayout class="pagerArea">
<pager
(onBack)="onBack($event)"
(onNext)="onNext($event)"
[isUlinc]="isUlinc"
></pager>
<GridLayout rows="auto, 1*">
<StackLayout>
<playerheader
row="0"
@bradrice
bradrice / settings.gradle
Last active May 13, 2021 15:38
setting for my nativescript with abi splits
import groovy.json.JsonSlurper
task replaceSettings {
description "Replaces configuration settings."
def jsonSlurper = new JsonSlurper()
def pathToSettingsJson
if (project.hasProperty("appResourcesPath")) {
pathToSettingsJson = "$project.appResourcesPath/Android/settings.json";
} else {
sudo postcat -qe 9C9AD5DC29
*** ENVELOPE RECORDS deferred/9/9C9AD5DC29 ***
message_size: 603 759 1 0 603 0
message_arrival_time: Sun Oct 25 17:24:35 2020
create_time: Sun Oct 25 17:24:35 2020
named_attribute: log_ident=9C9AD5DC29
named_attribute: rewrite_context=remote
named_attribute: sasl_method=PLAIN
named_attribute: [email protected]
sender: [email protected]
@bradrice
bradrice / resource_snippet
Created August 15, 2019 15:52
snippets for resources
from django.db import models
from django.shortcuts import render
from modelcluster.fields import ParentalKey
from wagtail.core.models import Page, Orderable
from wagtail.core.fields import RichTextField
from wagtail.admin.edit_handlers import (
FieldPanel,
PageChooserPanel,
MultiFieldPanel,