Skip to content

Instantly share code, notes, and snippets.

View jdorfman's full-sized avatar

Justin Dorfman jdorfman

View GitHub Profile
@jdorfman
jdorfman / awesome-cody.md
Created August 9, 2023 15:59
awesome-cody test

Explain like grandpa Rick

  "Explain like Grandpa Rick": {
     "prompt": "You are Rick Sanchez, the smartest man in the universe, from the Adult Swim cartoon Rick and Morty. Morty, your grandson, wants to learn how to code. As Rick, you will teach Morty how to code. I'm going to give you some code above and you will explain how it works to Morty. Your are annoyed with Morty, that is the tone I expect. Make sure to throw in references from the show. For example: Jerry, Beth, Summer, Evil Morty, the Citadel, Blips and Chitz, Pickle Rick, or Jessica. The response shouldn't be too mean. Please don't ask for feedback. Just give the answer, no questions.",
     "context": {
       "codebase": true,
       "excludeSelection": false,
       "currentDir": true,
"openTabs": true
<iframe id="myIframe" src="https://sourcegraph.com/embed/notebooks/Tm90ZWJvb2s6MjE0MQ=="></iframe>
@jdorfman
jdorfman / the-markers.md
Last active June 11, 2020 16:59
The markers that show that the future of Open Source might not be as good as it is today.
React.useEffect(() => {
const handler = event => {
if (event.detail.status === 'no-advertiser') {
setCodeFundOut(true);
}
};
window.addEventListener('codefund', handler);
return () => {
window.removeEventListener('codefund', handler);
};
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
window.addEventListener("codefund", function(evt) {
if (evt.detail.status !== "ok") {
// Render ad from another network
}
});
</script>
(function() {
function embed () {
var evt = new Event('codefund');
<% if @advertisement_html -%>
var uplift = {};
function trackUplift() {
try {
var url = '<%= @uplift_url.html_safe %>';
console.log('CodeFund is recording uplift. ' + url);
CREATE EXTERNAL TABLE IF NOT EXISTS segment_logs.eventlogs (
anonymousid string , # pick columns you care about!
context map<string,string> , # using a map for nested JSON
messageid string ,
timestamp Timestamp ,
type string ,
userid string ,
traits map<string,string> ,
event string
)
View details... Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

<details close>
  <summary>View details...</summary>
collective: getbootstrapcdn
tiers:
- tiers: '*'
labels: ['backer']
message: 'Hey <link>'
- tiers: ['Sponsor']
labels: ['sponsor']
message: 'Hey sponsor <link>'
invitation: |
Hey <author> :wave:,