Skip to content

Instantly share code, notes, and snippets.

View jwhitcraft's full-sized avatar
🏠
Working from home (always)

Jon Whitcraft jwhitcraft

🏠
Working from home (always)
View GitHub Profile
<?php
/**
* Custom Controller for LeadRouting Module to provide access
*/
class Customsgr_LeadRoutingController extends SugarController
{
/**
* Overwrite the preProcess() method to determin if access can be granted to this module
*
* @return null;
<?php
// this file is non-upgrade safe
// location: custom/modules/Contacts/views/view.detail.php
require_once('include/MVC/View/views/view.detail.php');
class ContactsViewDetail extends ViewDetail {
/**
* @see SugarView::display()
<?php
// this file is upgrade safe
// location: custom/modules/Contacts/views/view.detail.php
require_once('modules/Contacts/views/view.detail.php');
class CustomContactsViewDetail extends ContactsViewDetail {
/**
* @see SugarView::display()
<?php
// this file is upgrade safe
// location: custom/modules/Contacts/views/view.detail.php
require_once('include/MVC/View/views/view.detail.php');
class CustomContactsViewDetail extends ViewDetail {
/**
* @see SugarView::display()

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
Sampling process 18127 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling ruby (pid 18127) every 1 millisecond
Process: ruby [18127]
Path: /Users/jwhitcraft/.rbenv/versions/2.0.0-p247/bin/ruby
Load Address: 0x10381f000
Identifier: ruby
Version: 0
Code Type: X86-64
Parent Process: bash [17920]
@jwhitcraft
jwhitcraft / 0_reuse_code.js
Last active August 29, 2015 14:11
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
This file has been truncated, but you can view the full file.
150603 13:15:04 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
150603 13:15:04 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as process 15 ...
Uptime: 2 Threads: 1 Questions: 2 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 1.000
Setting up database
CATTLE_DB_CATTLE_DATABASE=mysql
CATTLE_DB_CATTLE_MYSQL_HOST=localhost
CATTLE_DB_CATTLE_MYSQL_NAME=cattle
CATTLE_DB_CATTLE_MYSQL_PORT=3306
CATTLE_DB_CATTLE_USERNAME=cattle
CATTLE_GRAPHITE_HOST=
INFO: Starting agent for CD3EDC74F05469FEEFC3
INFO: Access Key: CD3EDC74F05469FEEFC3
INFO: Config URL: http://104.236.36.164:8080/v1
INFO: Storage URL: http://104.236.36.164:8080/v1
INFO: API URL: http://104.236.36.164:8080/v1
INFO: IP: 104.236.127.222
INFO: Port:
INFO: Required Image: rancher/agent:v0.7.8
INFO: Current Image: rancher/agent:v0.7.8
INFO: Using image rancher/agent:v0.7.8
@jwhitcraft
jwhitcraft / ec2_cloud.groovy
Created March 21, 2017 20:14 — forked from vrivellino/ec2_cloud.groovy
Jenkins EC2 Plugin Configuration via Groovy
/*
* Configure the Jenkins EC2 Plugin via Groovy Script
* EC2 Plugin URL: https://wiki.jenkins-ci.org/display/JENKINS/Amazon+EC2+Plugin
*/
import hudson.model.*
import jenkins.model.*
import hudson.plugins.ec2.*
import com.amazonaws.services.ec2.model.InstanceType