Skip to content

Instantly share code, notes, and snippets.

Avatar
🎰
front-ending

Josh Lind doublejosh

🎰
front-ending
View GitHub Profile
@doublejosh
doublejosh / Wrapper.tsx
Created May 5, 2020
Typescript + MUI + Styled
View Wrapper.tsx
const MyComponent: React.FC<{ theme: MyTheme }> = styled(({ theme, ...props }) => <Box {...props} />)`
&& {
text-align: center;
padding-top: ${props => props.theme.spacing(2)}px;
}
`
export const Wrapper: React.FC<WrapperProps> = ({ ...props }) => {
const theme: MyTheme = useTheme()
return (
@doublejosh
doublejosh / app-market.json
Last active Jun 11, 2018
DroneDeploy App Market - Featured Apps
View app-market.json
[{
"org": "EZ3D",
"image": "/img/ez3dShowcase.jpg",
"summary": "Use EZRoof reports to view roof condition and generate measurements for creating precise estimates to repair or modify roofs.",
"segments": ["Developer"]
}, {
"org": "SLANTRANGE",
"image": "/img/slantrangeShowcase.jpg",
"summary": "Download field boundaries from flight plans &amp; import directly into SLANTRANGE analytics software for automatic cropping of maps.",
"segments": ["Agriculture", "Developer"]
@doublejosh
doublejosh / eloqua_tracking_script_jquery.js
Created Dec 8, 2017
Eloqua tracking script - Namespacing (jQuery flavor)
View eloqua_tracking_script_jquery.js
/**
* @file Eloqua visitor tracking (jQuery flavor).
*/
var Eloqua = window.Eloqua || {};
(function(Eloqua, $, window, _elqQ) {
Eloqua.timerId = null;
Eloqua.timeout = 5;
@doublejosh
doublejosh / eloqua_tracking_script.js
Last active Dec 8, 2017
Eloqua tracking script - slightly better namespacing
View eloqua_tracking_script.js
/**
* @file Eloqua visitor tracking.
*/
var Eloqua = Eloqua || {};
(function(Eloqua, window, _elqQ) {
Eloqua.timerId = null;
Eloqua.timeout = 5;
@doublejosh
doublejosh / metalsmith-plugin-template.js
Last active Oct 16, 2017
Install via metalsmith-plugin-template/index.js
View metalsmith-plugin-template.js
/**
* @file Plugin template.
*
* @example
* var myPlugin = require('./plugins/my-plugin');
* Metalsmith(__dirname)
* .source('./src')
* .destination('./build')
* .use(myPlugin())
* .build(function(err) {});
View odometer.html
<html>
<head>
<link rel="stylesheet" href="css/odometer-theme-default.css" media="screen" charset="utf-8">
<style>
.odometer.odometer-animating-up .odometer-ribbon-inner,
.odometer.odometer-animating-down.odometer-animating .odometer-ribbon-inner {
transition-duration: 1s !important;
}
</style>
</head>
View wistia_close_popover_end.js
/**
* Close video popup at the end automatically.
*/
(function () {
window._wq = window._wq || [];
// Access video object on page by ID.
_wq.push({id: "MY_VIDEO_ID", onReady: function (video) {
video.bind("end", function (t) {
video.popover.hide();
});
@doublejosh
doublejosh / add_menu_items.php
Created Jul 12, 2017
Add Drupal menu items with hierarchy (not working right)
View add_menu_items.php
/**
* Set the parent of menu items via name.
*
* @param string $menu_name
* Machine name of the menu.
* @param string $item_name
* Title of the menu link to use as the new parent.
* @param array $children
* List of menu item (mlids) to nest under parent.
*/
View visbile_by_param.js
/**
* Reveal content based on param value.
*
* @param {object} options
* @property {string} paramName
* @property {string} regex
* @property {string} selector
*/
function paramVisible(options) {
var urlObj = Tabia.util.parseUrl(),
@doublejosh
doublejosh / datasources.js
Created Jan 4, 2017
Manage past use of datasources via param
View datasources.js
/**
* Discover pane (web parts > 9.0).
*
* @namespace Tabia.DiscoverPane
*/
var Tabia = window.Tabia || {};
(function ($, _, Tabia, groucho, module) {
You can’t perform that action at this time.