Skip to content

Instantly share code, notes, and snippets.

View bidah's full-sized avatar

Rodrigo Figueroa bidah

View GitHub Profile
The prompt:
Below I am going to issue a command in natural language for a set of salesforce operations.
Your response will be a json object that can be parsed by NodeJS JSON.parse of the format:
{
"Account": AccObject,
"Opportunity": OppObject,
"DefaultsUsed": []
import {assertString} from 'plugins/assert'
type TemplateContext = {
input: string
customPrompt?: string
}
type Template = (context: TemplateContext) => string
type ServerPredictionPrompt = {
@ChristopherBiscardi
ChristopherBiscardi / yarn-workspace.sh
Last active November 22, 2019 20:05
yarn workspace command
# yw develop
yw() {
yarn workspace $(yarn workspaces info --json | jq '.data' -r | jq "[keys][0] []" -r | fzf) $@
}

I'm t9md

t9md__t9md_.png Presentation1.png

  • My editor history: Vim > Emacs > Vim > Atom
@zkat
zkat / index.js
Last active March 10, 2024 14:32
npx is cool
#!/usr/bin/env node
console.log('yay gist')
@jaydenseric
jaydenseric / zeit-now-g-suite-setup.md
Created March 20, 2017 04:46
Zeit Now G Suite setup

Run each of the following lines, replacing yourdomain.com and codehere with your details:

now dns add yourdomain.com @ TXT google-site-verification=codehere
now dns add yourdomain.com @ MX ASPMX.L.GOOGLE.COM 1
now dns add yourdomain.com @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT3.ASPMX.L.GOOGLE.COM 10
now dns add yourdomain.com @ MX ALT4.ASPMX.L.GOOGLE.COM 10
@dlaroe
dlaroe / Gherkin-Layout.kbd.json
Last active September 10, 2019 00:49
Gherkin Layout
[
{
"name": "Gherkin Layout",
"author": "https://www.reddit.com/user/di0ib"
},
[
{
"d": true
},
"<h4>Zero</h4>",
@msmfsd
msmfsd / es7-async-await.js
Last active February 4, 2024 17:38
Javascript fetch JSON with ES7 Async Await
// Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch
// async function
async function fetchAsync () {
// await response of fetch call
let response = await fetch('https://api.github.com');
// only proceed once promise is resolved
let data = await response.json();
// only proceed once second promise is resolved
@knowbody
knowbody / App.js
Last active September 11, 2023 09:31
Check internet connection in React Native app
// quick snippet to check the connection in your RN app
// dispatches an `setIsConnected` action every time the NetInfo changes (on/off network)
componentDidMount() {
const dispatchConnected = isConnected => this.props.dispatch(setIsConnected(isConnected));
NetInfo.isConnected.fetch().then().done(() => {
NetInfo.isConnected.addEventListener('change', dispatchConnected);
});
}
@ivanyv
ivanyv / application.amp.erb
Created December 12, 2015 02:51
Easy Google AMP on Rails
<html>
<head>
<link rel="canonical" href="<%= current_uri_sans_amp %>">
</head>
...
</html>