Skip to content

Instantly share code, notes, and snippets.

@dylanmensaert
dylanmensaert / gist:62fd3ae8de4ff6c7f8bc
Created September 22, 2014 11:21
mm.log - Compile tabs
--------------------------------------------
---------- NEW OPERATION REQUESTED ---------
--------------------------------------------
compile
Namespace(client='SUBLIME_TEXT_3', format='json', offline=False, operation='compile', quiet=False, respond_with_html=False, ui_switch=False, uid=None, verbose=False)
{u'files': [u'C:\\Users\\Dylan\\Projects\\MavensMate\\dylanmensaert\\src\\classes\\MyTest.cls', u'C:\\Users\\Dylan\\Projects\\MavensMate\\dylanmensaert\\src\\classes\\OtherTest.cls'], u'project_name': u'dylanmensaert', 'verbose': False, 'args': Namespace(client='SUBLIME_TEXT_3', format='json', offline=False, operation='compile', quiet=False, respond_with_html=False, ui_switch=False, uid=None, verbose=False), 'client': 'SUBLIME_TEXT_3', 'ui': False, u'workspace': u'C:\\Users\\Dylan\\Projects\\MavensMate', 'operation': 'compile'}
--------------------------------------------
@dylanmensaert
dylanmensaert / metadata_subscriptions
Last active March 31, 2016 14:34
All metadata subscriptions for mavensmate
["ActionLinkGroupTemplate", "AnalyticSnapshot", "ApexClass", "ApexComponent", "ApexPage", "ApexTrigger", "AppMenu", "ApprovalProcess", "AssignmentRules", "AuraDefinitionBundle", "AuthProvider", "AutoResponseRules", "CallCenter", "ChannelLayout", "Community", "ConnectedApp", "CorsWhitelistOrigin", "CustomApplication", "CustomLabels", "CustomMetadata", "CustomObject", "CustomObjectTranslation", "CustomPageWebLink", "CustomPermission", "CustomSite", "CustomTab", "Dashboard", "DataCategoryGroup", "Document", "EmailTemplate", "EscalationRules", "ExternalDataSource", "FlexiPage", "Flow", "FlowDefinition", "Group", "HomePageComponent", "HomePageLayout", "InstalledPackage", "Layout", "Letterhead", "ManagedTopics", "MatchingRules", "NamedCredential", "Network", "PathAssistant", "PermissionSet", "PostTemplate", "Profile", "Queue", "QuickAction", "RemoteSiteSetting", "Report", "ReportType", "Role", "SamlSsoConfig", "Scontrol", "Settings", "SharingRules", "SharingSet", "SiteDotCom", "StaticResource", "SynonymDictionary",
@dylanmensaert
dylanmensaert / controllers.application.js
Created May 25, 2016 12:13
cp not updating when using hasMany(..).value() instead of get(..)
import Ember from 'ember';
export default Ember.Controller.extend({
comments: Ember.computed('model.comments.[]', function() {
return this.get('model').hasMany('comments').value();
})
});
@dylanmensaert
dylanmensaert / controllers.application.js
Created May 26, 2016 11:20
cp not updating in certain use cases
import Ember from 'ember';
export default Ember.Controller.extend({
comments: Ember.computed('model.comments.[]', function() {
return window.comments;
})
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
isLoading: false,
counter: 0,
actions: {
load: function() {
var counter = 0;
@dylanmensaert
dylanmensaert / controllers.application.js
Created October 20, 2016 08:30
testing Ember.get in .hbs
import Ember from 'ember';
export default Ember.Controller.extend({
something: 'check console'
});
@dylanmensaert
dylanmensaert / controllers.application.js
Last active September 12, 2017 11:20
Add support for rolling back hasMany relationships
import Ember from 'ember';
export default Ember.Controller.extend({
users: [],
actions: {
addUser: function() {
let user = this.store.createRecord('user', {
name: 'test'
});
// Place your settings in this file to overwrite the default settings
{
"editor.rulers": [160],
"editor.renderWhitespace": "all",
"editor.formatOnSave": false,
"workbench.editor.enablePreview": false,
"workbench.colorTheme": "Monokai",
"window.openFoldersInNewWindow": "on",
"files.exclude": {
"**/.git": true,
public class MaintenanceRequestHelper {
public static void updateWorkOrders(List<Case> caseList){
Map<Id, Case> caseToNewCaseMap = new Map<Id, Case>();
for(Case caseInstance : caseList)
{
Case oldCase = (case)Trigger.oldMap.get(caseInstance.Id);
if(caseInstance.Status == 'Closed' && oldCase.Status != 'Closed' && (caseInstance.Type == 'Repair' || caseInstance.Type == 'Routine Maintenance'))
public with sharing class WarehouseCalloutService {
private static final String WAREHOUSE_URL = 'https://th-superbadge-apex.herokuapp.com/equipment';
@future(callout=true)
public static void runWarehouseEquipmentSync(){
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint(WAREHOUSE_URL);
request.setMethod('GET');