Install the OpenSSL on Debian based systems
sudo apt-get install openssl
'use strict'; | |
module.exports = function CustomError(message, extra) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = this.constructor.name; | |
this.message = message; | |
this.extra = extra; | |
}; | |
require('util').inherits(module.exports, Error); |
// go on you labels pages | |
// eg https://github.com/cssnext/cssnext/labels | |
// paste this script in your console | |
// copy the output and now you can import it using https://github.com/popomore/github-labels ! | |
var labels = []; | |
[].slice.call(document.querySelectorAll(".label-link")) | |
.forEach(function(element) { | |
labels.push({ | |
name: element.textContent.trim(), |
# This script uses the GitHub Labels REST API | |
# https://developer.github.com/v3/issues/labels/ | |
# Provide a personal access token that can | |
# access the source and target repositories. | |
# This is how you authorize with the GitHub API. | |
# https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line | |
GH_TOKEN="YOUR_TOKEN" | |
# If you use GitHub Enterprise, change this to "https://<your_domain>/api/v3" |
/** | |
* Inspired by @MoOx original script: https://gist.github.com/MoOx/93c2853fee760f42d97f | |
* Adds file download per @micalevisk https://gist.github.com/MoOx/93c2853fee760f42d97f#gistcomment-2660220 | |
* | |
* Changes include: | |
* - Get the description from the `title` attribute instead of `aria-label` (doesn't exist anymore) | |
* - Use style.backgroundColor and parse the rgb(...) to hex (rather than regex parsing of 'style' string) | |
* - Downloads labels to a JSON file named after the webpage to know which GitHub repo they came from. | |
* | |
* Last tested 2019-July-27: |
You can’t clone a Bitbucket repo using GithHub Desktop directly. Instead you would have to:
public class FileController { | |
@AuraEnabled | |
public static Id saveTheFile(Id parentId, String fileName, String base64Data, String contentType) { | |
base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8'); | |
Attachment a = new Attachment(); | |
a.parentId = parentId; | |
a.Body = EncodingUtil.base64Decode(base64Data); |
while true; do sleep 1; curl http://www.google.com; echo -e '\n\n\n\n'$(date);done |
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) + '%\'' + |
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" | |
controller="AddressFinderController" access="global"> | |
<aura:attribute name="accounts" type="Account[]"/> | |
<aura:attribute name="contacts" type="Contact[]"/> | |
<aura:registerEvent name="AddressInfo" type="c:AddressInfo"/> | |
<div class="slds-form--stacked"> | |
<div class="slds-form-element"> | |
<label class="slds-form-element__label" for="inputSample2">Account Search</label> |