Skip to content

Instantly share code, notes, and snippets.

View DaveAldon's full-sized avatar
📱
Working on the next great mobile app!

David Crawford DaveAldon

📱
Working on the next great mobile app!
View GitHub Profile

Privacy Policy

This privacy policy applies to the Mute My Browser app (hereby referred to as "Application") for mobile devices that was created by David Crawford (hereby referred to as "Service Provider") as a Commercial service. This service is intended for use "AS IS".

Information Collection and Use

The Application collects information when you download and use it. This information may include information such as

  • Your device's Internet Protocol address (e.g. IP address)
  • The pages of the Application that you visit, the time and date of your visit, the time spent on those pages
{"format": "graph-model", "generatedBy": "2.3.0", "convertedBy": "TensorFlow.js Converter v3.8.0", "signature": {"inputs": {"lstm_input": {"name": "lstm_input:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "-1"}, {"size": "100"}, {"size": "10"}]}}}, "outputs": {"dense": {"name": "Identity:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "-1"}, {"size": "10"}]}}}}, "modelTopology": {"node": [{"name": "StatefulPartitionedCall/sequential/lstm_1/PartitionedCall/TensorArrayV2_1/element_shape", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "2"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "StatefulPartitionedCall/sequential/lstm_1/zeros_1/packed/1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "StatefulPartitionedCall/sequential/lstm_1/zeros_1/Const", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {}}}, "dtype": {"type": "DT_
@DaveAldon
DaveAldon / discordMocks.js
Created August 17, 2021 19:11
Javacript discord mocks for jest
import {
Client,
Guild,
Channel,
GuildChannel,
TextChannel,
User,
GuildMember,
Message,
} from "discord.js";
npx react-native run-ios --simulator="iPhone 8"
npx react-native run-ios --simulator="iPhone 8 Plus"
npx react-native run-ios --simulator="iPhone 11"
npx react-native run-ios --simulator="iPhone 11 Pro"
npx react-native run-ios --simulator="iPhone 11 Pro Max"
npx react-native run-ios --simulator="iPhone SE (2nd generation)"
npx react-native run-ios --simulator="iPhone 12 mini"
npx react-native run-ios --simulator="iPhone 12"
npx react-native run-ios --simulator="iPhone 12 Pro"
npx react-native run-ios --simulator="iPhone 12 Pro Max"
@DaveAldon
DaveAldon / HeaderCheck.cls
Last active July 15, 2019 15:57
Getting headers from a REST call
Class HeaderCheck Extends %CSP.REST
{
ClassMethod HandleDefaultCorsRequest(pUrl As %String) As %Status [ Internal, Private ]
{
//<!-- All error pages MUST inherit from %CSP.Error -->
//<csp:CLASS super="%CSP.Error, %RegisteredObject" INCLUDES="%occErrors">
#dim tSC As %Status = $$$OK
#dim e As %Exception.AbstractException
@DaveAldon
DaveAldon / datatablefunction.js
Created May 23, 2019 20:00
Get rows via eq instead of datatable index, to get the data from filtered items correctly
$('#tblName tbody').on( 'click', 'tr', function () {
$('#tblName tbody tr ').each( function () {
if ( $(this).hasClass('selected1') ) {
var rowindex = table.row(this).index();
var rowData = table.row(this).data();
var selectedName = table.row(this)[0];
var anotherWayToGetName = table.cell(rowIndex, 0).data();
console.log(rowIndex, rowData, selectedName, anotherWayToGeName);
}
} );
@DaveAldon
DaveAldon / CustomDate.cls
Created April 3, 2019 13:17
Using JavaScript within ObjectScript for client side use
Include (HS.Common, %ZHSLIB)
/// This class edits the datetext component to include date input without delimiters
Class GLHC.Util.CustomDate Extends %ZEN.Component.dateText
{
Parameter NAMESPACE = "http://www.intersystems.com/Project";
/// Remove formatting to get logical date value.
ClientMethod unformatValue(val) [ Language = javascript ]
@DaveAldon
DaveAldon / HelpfulSQLQueries.txt
Created April 1, 2019 17:43
Helpful SQL Queries to get interesting information
// Shows table size of every sql table
SELECT table_schema, table_name, data_length, index_length FROM information_schema.tables
@DaveAldon
DaveAldon / quotes.cls
Created January 10, 2019 21:01
Replace single quotes with double quotes in a string
// String we want to alter
set queryString = """"""""""""
// Init piece delimeter finder
set doubleQ = ","""
// Use piece to extract the double quote
set doubleQ = $Piece(doubleQ,",",2)
// Replace statement using the double quote string
set queryString = $REPLACE(queryString,"'",doubleQ)
@DaveAldon
DaveAldon / dynamicSqlIndirection.cls
Created April 19, 2018 19:07
Indirection for iterating over dynamic sql and setting dynamic object properties
set tResults = []
WHILE rSet.%Next() {
// Init object for holding the values
set tRow = {}
// The following iterates over the dynamic sql object and dynamically sets values using indirection
set tMetadata = rSet.%GetMetadata()
// Get size of returned object
set tColumnCount = tMetadata.columns.Count()
// Loop through the count
for x=1:1:tColumnCount {