Skip to content

Instantly share code, notes, and snippets.

Taiki Yoshikawa tyoshikawa1106

Block or report user

Report or block tyoshikawa1106

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
! The MIT License (MIT)
! Copyright (c) 2015
! Permission is hereby granted, free of charge, to any person obtaining a copy
! of this software and associated documentation files (the "Software"), to deal
! in the Software without restriction, including without limitation the rights
! to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
! copies of the Software, and to permit persons to whom the Software is
View myfirstltng.cmp
<aura:component implements="force:appHostable" controller="myfirstltngController">
<aura:attribute name="account" type="Account"/>
<aura:handler name="init" action="{!c.init}" value="{!this}"/>
<button onclick="{!}">click</button>
View package.json
"name": "retrieve_folders",
"dependencies": {
"bluebird": "^2.4.2",
"dotenv": "^0.4.0",
"jsforce": "^1.3.1",
"lodash": "^2.4.1",
"underscore": "^1.7.0",
"unzip": "^0.1.11"
peterknolle / AutocompleteController.cls
Last active Jul 25, 2018
Lightning Autocomplete Component
View AutocompleteController.cls
public class AutocompleteController {
public static List<sObject> getSuggestions(String sObjectType, String term, String fieldsToGet, Integer limitSize) {
// could add in logic to remove possible duplicate fields
String fields = fieldsToGet.length() > 0 ? ',' + fieldsToGet : '';
String soql =
' SELECT Name, Id ' + String.escapeSingleQuotes(fields) +
' FROM ' + String.escapeSingleQuotes(sObjectType) +
' WHERE Name Like \'' + String.escapeSingleQuotes(term) + '%\'' +
jeffdonthemic / AddToCart.evt
Last active Sep 28, 2018
Salesforce1 Lightning Demo for Spring '15
View AddToCart.evt
<aura:event type="APPLICATION" description="Add to cart event.">
<aura:attribute name="product" type="Product__c"/>
View Example REST Service.cls
//Create a resource mapping
// - * wildcard must be preceded and followed by a '/' unless * is end character
// - resource must start with '/'
// - one mapping per class
// - class must be global
global with sharing class LanguageService {
peterknolle / JoinController.cls
Created May 7, 2014
Google Visualization API Joins in Visualforce
View JoinController.cls
public with sharing class JoinController {
// The from and through dates are hard-coded for simplicity's sake.
// Should change to parameters or input or something else.
public String getPageViewsJson() {
List<Page_View_Summary__c> pvs = [
SELECT Date__c, Number_of_Views__c
FROM Page_View_Summary__c
WHERE Date__c >= 2014-04-01
AND Date__c <= 2014-04-30
View Governor1.cls
public class Governor1{
private static final integer ONE = 1;
private static final String ONE_MESSAGE = 'ええぃ!セールスフォースのガバナは化け物か!';
private Governor1(){}
public static void check(){
peterknolle /
Last active Aug 7, 2018
Visualforce Remote Objects and jsTree jQuery plugin
<apex:page >
<!-- download the jstree from and upload the dist directory as a static resource -->
<link href="{!URLFOR($Resource.jsTree, 'themes/default/style.min.css')}" rel="stylesheet" />
<script src="{!URLFOR($Resource.jsTree, 'libs/jquery.js')}"></script>
<script src="{!URLFOR($Resource.jsTree, 'jstree.min.js')}"></script>
<script src="{!URLFOR($Resource.jsTree, 'jstree.min.js')}"></script>
Change the remoteObjectModel name="Account and
View index.html
<!DOCTYPE html>
<html lang="ja">
<meta charset="UTF-8">
<script type="text/javascript"
<script type="text/javascript"
You can’t perform that action at this time.