Skip to content

Instantly share code, notes, and snippets.

Kevin Poorman noeticpenguin

Block or report user

Report or block noeticpenguin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@noeticpenguin
noeticpenguin / CommunityDebugger.page
Created Feb 5, 2015
CommunityDebugger visualforce page
View CommunityDebugger.page
<apex:page controller="CommunityDebuggerCtrl" action="{!fetchFailingPage}" showHeader="false" sidebar="false" >
<apex:outputText id="failingPageResponse" escape="false" value="{!failingPageResponse}" />
</apex:page>
@noeticpenguin
noeticpenguin / CommunityDebuggerCtrl.cls
Last active Sep 28, 2016
Community Debugger controller
View CommunityDebuggerCtrl.cls
public with sharing class CommunityDebuggerCtrl {
public String failingPageResponse { get; set; }
String toLoad {get; private set;}
Map<String, String> params {get; private set;}
String queryString = '?';
public CommunityDebuggerCtrl() {
params = ApexPages.currentPage().getParameters();
toLoad = (String) params.get('page');
@noeticpenguin
noeticpenguin / log.cls
Last active Aug 29, 2015
Logging class, for better identification of debug output in massive salesforce log files.
View log.cls
public class log {
// Usage:
// log.info('PageContructorDebug', o, 'why is my object null?');
// log.log('PageContructorDebug', o, 'why is my object null?');
// log.warn('PageContructorDebug', o, 'why is my object null?');
// log.error('PageContructorDebug', o, 'why is my object null?');
//
// For instance: log.info('PageContructorDebug', o, 'why is my object null?');
// would result in a debug block that looks like this:
View gist:749f13d11f195b0c0460

Using Obj-C with MacRuby/Rubymotion

This little post aims to help you to translate Objective-C Blocks into Ruby blocks. Let's start by taking a look at few examples of iOS API call where blocks are used for animations and enumeration

Ruby Lambda Syntaxes:

Im Rubymotion and MacRuby you can use all the Ruby Lambda syntaxes that are:

block = lambda { |param|  ... }
@noeticpenguin
noeticpenguin / ExampleVFFlowPage.html
Last active Aug 29, 2015
Universal Redirect controller for VF Based Pages.
View ExampleVFFlowPage.html
<apex:page Controller="FlowRedirectController">
<flow:interview name="RedirectFlow" interview="{!redirectTo}" finishLocation="{!finishLocation}" >
<!-- This Parameter is *required!* -->
<apex:param name="StartFlow" value="YOUR_FLOW_NAME_HERE" />
<!--
Any Params you need to pass into your flow.
<apex:param name="CaseId" value="{!CaseId}"/>
-->
</flow:interview>
</apex:page>
View keybase.md

Keybase proof

I hereby claim:

  • I am noeticpenguin on github.
  • I am codefriar (https://keybase.io/codefriar) on keybase.
  • I have a public key whose fingerprint is 2C3A 62E2 921E B13F 87D7 4F0C F975 BA26 3EBA CFAA

To claim this, I am signing this object:

View How to call the code coverage query via execute anonymous
toolingSoapSForceCom.SessionHeader_element sessionEl = new toolingSoapSForceCom.SessionHeader_element();
sessionEl.sessionId = UserInfo.getSessionId();
toolingSoapSForceCom.SforceService service = new toolingSoapSForceCom.SforceService();
service.SessionHeader = sessionEl;
//service.endpoint_x = //Adjust this to your endpoint, if needed...
toolingSoapSForceCom.ApexCodeCoverageAggregateQueryResult queryResult = service.queryApexCodeCoverageAggregate('Select NumLinesCovered From ApexCodeCoverageAggregate');
System.debug(queryResult);
View PushTopic.java
notifyForFieldOperationCreate=true
query='SELECT ID, Name, MailingAddress FROM Account'
View deploy-rails-4-app-with-dokku-on-digital-ocean.md

Deploy Rails 4 app with Dokku on DigitalOcean

Install dokku

First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel

Then ssh with root account, run this in termianl:

$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
View Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
jasmine: {
proposalPlus: {
// Include paths for both the local user, if we're in dev mode, as well as share mode
src: ['pp_js' + process.env.USER + '.resource/pp_js/**/*.js',
'pp_ngApp_' + process.env.USER + '.resource/pp_ngApp/**/*.js',
'pp_js/pp_js/**/*.js',
'pp_ngApp/pp_ngApp/**/*.js'
],
You can’t perform that action at this time.