Skip to content

Instantly share code, notes, and snippets.

View tyoshikawa1106's full-sized avatar
🇯🇵
TOKYO

Taiki Yoshikawa tyoshikawa1106

🇯🇵
TOKYO
View GitHub Profile
@jnrbsn
jnrbsn / better-gist-styles.css
Created September 14, 2010 01:24
Better styles for embedding GitHub Gists
/* Better styles for embedding GitHub Gists */
.gist{font-size:13px;line-height:18px;margin-bottom:20px;width:100%}
.gist pre{font-family:Menlo,Monaco,'Bitstream Vera Sans Mono','Courier New',monospace !important}
.gist-meta{font-family:Helvetica,Arial,sans-serif;font-size:13px !important}
.gist-meta a{color:#26a !important;text-decoration:none}
.gist-meta a:hover{color:#0e4071 !important}
<apex:page standardController="Lead">
<style>
.fieldempty
{
background-color: yellow;
}
.fieldpopulated
{
background-color: white;
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>todo</title>
<script type="text/javascript"
src="http://codeorigin.jquery.com/jquery-1.10.2.min.js">
</script>
<script type="text/javascript"
src="http://cdnjs.cloudflare.com/ajax/libs/knockout/2.3.0/knockout-min.js">
@peterknolle
peterknolle / remoteObjectNodes.page
Last active August 7, 2018 09:07
Visualforce Remote Objects and jsTree jQuery plugin
<apex:page >
<!-- download the jstree from jstree.com 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
public class Governor1{
private static final integer ONE = 1;
private static final String ONE_MESSAGE = 'ええぃ!セールスフォースのガバナは化け物か!';
private Governor1(){}
public static void check(){
Governor1.check(false);
}
@peterknolle
peterknolle / JoinController.cls
Created May 7, 2014 02:20
Google Visualization API Joins in Visualforce
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
//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
@RestResource(urlMapping='/languages/*')
global with sharing class LanguageService {
// ROUTES:
@jeffdonthemic
jeffdonthemic / AddToCart.evt
Last active December 29, 2022 17:11
Salesforce1 Lightning Demo for Spring '15
<aura:event type="APPLICATION" description="Add to cart event.">
<aura:attribute name="product" type="Product__c"/>
</aura:event>
@peterknolle
peterknolle / AutocompleteController.cls
Last active December 29, 2022 17:11
Lightning Autocomplete Component
public class AutocompleteController {
@AuraEnabled
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) + '%\'' +
{
"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"
}