Skip to content

Instantly share code, notes, and snippets.

View TonyRenHK's full-sized avatar
:octocat:
Salesforce

CK Ren TonyRenHK

:octocat:
Salesforce
View GitHub Profile
@TonyRenHK
TonyRenHK / gist:bb6966f67bb1d6783670ff5f1d129d36
Created January 16, 2019 01:59 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
List<String> list = Arrays.asList("one", "two", "three");
//diamond operator
List<String> list = new ArrayList<>();
list.add("one");
list.add("two");
list.add("three");
@TonyRenHK
TonyRenHK / 0 Initialization.java
Last active July 30, 2018 15:17
Java Study Note
//HashMap:
HashMap<Integer, Integer> IntegerMap = new HashMap<Integer, Integer>();
IntegerMap.put(1,9);
//For primitive types:
int[] myIntArray = new int[3];
int[] myIntArray = {1,2,3};
int[] myIntArray = new int[]{1,2,3};
@TonyRenHK
TonyRenHK / Update heroku
Created July 4, 2018 03:36
Update heroku
curl https://cli-assets.heroku.com/install.sh | sh
sudo ln -s /usr/local/heroku/bin/heroku /usr/bin/heroku
@TonyRenHK
TonyRenHK / K music
Last active May 4, 2019 01:43
Python
import pyautogui, sys
import time
for num in range(1,20):
pyautogui.moveTo( 4294966792, 901, 2)
pyautogui.click()
pyautogui.typewrite('Good!')
pyautogui.press('enter')
time.sleep(3)
@TonyRenHK
TonyRenHK / code.gs
Created October 5, 2017 14:31
Daily Note Google App Script Application
/**
Link : https://script.google.com/macros/s/AKfycbxYJhxct6evZHWRUkgXk_ijuj0mgRbnMUf9xOn3IXi8iAFoPB70/exec
*/
function doGet() {
return HtmlService.createHtmlOutputFromFile('index')
.setSandboxMode(HtmlService.SandboxMode.IFRAME).addMetaTag('viewport', 'width=device-width, initial-scale=1');
}
@TonyRenHK
TonyRenHK / Report.html
Created August 24, 2017 07:04 — forked from anonymous/Report.html
This is for Jeremy Thompson from Success Community!
<html>
<head>
<script type="text/javascript">
function hideReportCaption(){
var htmlElements = document.getElementsByTagName('h2');
for(var index=0; index<htmlElements.length; index++){
if(htmlElements[index].innerHTML=='Report'){
htmlElements[index].style.display='none';
}
}
@TonyRenHK
TonyRenHK / Report.html
Created August 24, 2017 07:04 — forked from anonymous/Report.html
This is for Jeremy Thompson from Success Community!
<html>
<head>
<script type="text/javascript">
function hideReportCaption(){
var htmlElements = document.getElementsByTagName('h2');
for(var index=0; index<htmlElements.length; index++){
if(htmlElements[index].innerHTML=='Report'){
htmlElements[index].style.display='none';
}
}
@TonyRenHK
TonyRenHK / Gitshell.sh
Last active November 10, 2017 03:23
Push your code to bitbucket direcly
#!/bin/bash
<<'COMMENT'
run : bash Gitshell.sh
COMMENT
echo "~~~~~~~~~~~~~~~~~Fisrt, Clone your repository~~~~~~~~~~~~~~~~~~"
git clone https://username:Password@bitbucket.org/tonyrenhk/YourCodeRepository.git
@TonyRenHK
TonyRenHK / retrieve_salesforce_Class_Page_code.js
Last active December 15, 2019 09:36
retrieve salesforce Class/Page code.js
var jsforce = require('jsforce');
var mkdirp = require('mkdirp');
var conn = new jsforce.Connection({
loginUrl: 'https://test.salesforce.com', // if the org is sandbox 'https://test.salesforce.com', if it is Production,please input https://login.salesforce.com'
version: '36.0'
});
var currentdate = new Date();
var datetime = 'YourProjectName_' + String(currentdate.getFullYear()) + String(currentdate.getMonth() + 1) + String(currentdate.getDate()) + '-' + String(currentdate.getHours()) + String(currentdate.getMinutes()) + String(currentdate.getSeconds());