Skip to content

Instantly share code, notes, and snippets.

View masonjo's full-sized avatar

masonjo

  • E-rehab LLC
  • Carlsbad CA USA
View GitHub Profile
@masonjo
masonjo / Autoload with Tracy & no login.php
Created February 2, 2022 00:02
$NoLoginNeeded - used in auth/auth.php which is based on https://github.com/auraphp/Aura.Auth load_tracy - https://github.com/nette/tracy | In Dev just goes OR put DEBUGGER_FORCED=false in .env file
$NoLoginNeeded = true;
include($_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php');
load_tracy();
$showdebug = false;
@masonjo
masonjo / Full Example
Created February 1, 2022 23:49
Line 3 - Notice form-horizontal class Line 13 - options horizontal Line 17 - set the default values and options Choices for select items can be done earlier or right before items. This example has two columns
<div class="well" >
<form action="" method="POST" role="form" >
<div class="row form-horizontal" >
<div class="col-md-6" >
<?php
$sql = "select * from practice where ID=$practice_id";
$form_values1 = ORM::for_table('dummy')->raw_query($sql)->find_array();
$form_values = $form_values1[0];
$fv = fetch1("select firstVisit,gocardconnect from upgrade where practice_id=$practice_id");
$form_values['firstVisit'] = $fv['firstVisit'];
@masonjo
masonjo / Dataset (Faster)
Created February 1, 2022 23:48
DataTables for ptclinic8
<?php
if (!defined('canInclude')) {
header('Location:/ca/report/?page=_base');
}
$hide_pager = true;
$todoPresetData = ORM::for_table('todo_preset')->where_not_equal('retired', 1)->find_array();
$todoPresetData = json_encode($todoPresetData);
?>
<div class="container-fluid m-a-xs" >
<div class="row" >
@masonjo
masonjo / full_date_added-upate.sql
Last active June 25, 2020 19:40
Update full_date_added in mysql #mysql
UPDATE subscribers SET `full_date_added`=FROM_UNIXTIME(date_added) WHERE `full_date_added` IS NULL;
@masonjo
masonjo / MSS Not G5.sql
Created May 22, 2019 00:10
MSS Not G5 Mysql statement
SELECT ls.datecreated AS Added_MSS,practice.ID, practice.Name,practice.contact_name FROM practice,finances,lateststatus AS ls WHERE ls.practice_id=practice.ID AND practice.`status` = 'Active' AND in_count=1 AND practice.ID=finances.practice_id AND finances.mss=1 AND g5!='true' AND bom!='true' AND statustype='Added MSS' GROUP BY ID ORDER BY Added_MSS ASC;
@masonjo
masonjo / javascript_resources.md
Created July 17, 2014 14:23 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@masonjo
masonjo / css_resources.md
Created July 17, 2014 14:23 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@masonjo
masonjo / 0_reuse_code.js
Created July 17, 2014 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console