Skip to content

Instantly share code, notes, and snippets.

View otherjohn's full-sized avatar

John Hamman otherjohn

  • Williamsburg, Va
View GitHub Profile
@otherjohn
otherjohn / ghl-admin-add-class.js
Last active August 30, 2022 14:06
Add a css class the Go Highlevel Backend Body
;(function () {
'use strict';
// replace YOUR-CSS-CLASS with your own.
document.body.classList.add('YOUR-CSS-CLASS');
})();
@otherjohn
otherjohn / gohighlevel-admin.js
Last active August 29, 2022 11:57
Watching For Page Load and Page Change
// Listeners
!(async function () {
// listen to page change
let e = location.href;
new MutationObserver(() => {
const t = location.href;
t !== e && ((e = t), urlChanged());
}).observe(document, {
subtree: !0,
childList: !0,
@otherjohn
otherjohn / index.html
Created July 17, 2018 18:25
RiotJS Bean Calculator
<hello-world />
<script type="riot/tag">
<hello-world>
<div class="row">
<div class="medium-7 columns">
<form
oninput={ loanCalc }
onchange={ loanCalc }
>
@otherjohn
otherjohn / App.jsx
Created July 16, 2016 16:16
Cant find the cause of "type.toUpperCase is not a function"
var React = require('react');
import WtmAuthor from './components/WtmAuthor.jsx';
React.render(
<WtmAuthor />,
document.getElementById('wtm-author')
);
<body>
<app>
<h1>Some Heading</h1>
<p>some content</p>
<someDirective></someDirective>
<someOtherDirective>
<p>default content</p>
</sommeOtherDirective>
</app>
</body>
@otherjohn
otherjohn / gist:af51e0746f351b8baf7001d4b3ec2e21
Last active April 13, 2016 14:58 — forked from kaumac/gist:de6f5126c04d5c210dd2
Firebase companies and employees data structure
{
companies: {
cmp0001: {
name: "Happy company"
employees: {
u0001: "admin",
u0002: "manager"
}
},
cmp0002: {
@otherjohn
otherjohn / cas.yml
Last active December 25, 2015 07:09
sample CASinoApp yml files
production:
frontend:
sso_name: 'CASino'
footer_text: 'Powered by <a href="http://rbcas.com/">CASino</a>'
authenticators:
my_funny_sql_database:
authenticator: "ActiveRecord"
options:
connection:
adapter: "postgresql"
Feature: List Users
Background:
Given I send and accept JSON
Scenario: Successfully list users when logged in user is admin
Given the following users exist
|id|email |first_name |last_name |password |authentication_token|role |
|10|user1@gmail.com |First |User |test1234 |auth_token_123 |user |
|11|user2@gmail.com |Second |User |test1234 |auth_token_223 |user |

This gist shows you how to do a slide-down menu in Titanium.

Features:

  • Toggle using a menu button in the ever-visible navigation bar on the top of the screen
  • Menu options animating down from under the navigation bar
  • Hide by swiping the menu options up
  • Hide by tapping the area below the menu options (being the view covered by the slide-down menu

Images:

@otherjohn
otherjohn / .gitignore
Last active August 29, 2015 14:09 — forked from salcode/.gitignore
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20140606
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore