Skip to content

Instantly share code, notes, and snippets.

@hagb4rd
Last active October 1, 2020 17:52
Show Gist options
  • Save hagb4rd/508dedf07b02005874ec0b4f6863dbeb to your computer and use it in GitHub Desktop.
Save hagb4rd/508dedf07b02005874ec0b4f6863dbeb to your computer and use it in GitHub Desktop.
JSLAVE - irc bot m0ther concept

JSLAVE m0ther concept

Serving Static Gistlets

U can serve files in a gist with jslave using the gists ID/ilename

Example Gist: https://gist.github.com/hagb4rd/bf6f2b842a19d58179f58b46a5ae4660

Served via Jslave: https://jslave.herokuapp.com/gist/bf6f2b842a19d58179f58b46a5ae4660/index.html

Best just reference scripts and styles in a html as bare filenames (without paths) For media you could use external sources or data-urls.

m0ther heroku-demo-instance on freenode IRC

ircs://chat.freenode.org/%23%23ge

If you don't have a IRC Client, you could try out https://www.irccloud.com/irc/freenode/channel/%23%23ge for instance.

If m0ther is not in the chat-room try opening https://jslave.herokuapp.com in browser. This should restart the heroku app.

Querying the bot in the channel:

m0ther: <js expression>

or just just /query m0ther and write any js-expression without leading prefix.

try m0ther: cx to display objects in the "global context"

ask for earend1 on ##javascript or leave me a memo:

/msg MemoServ earend1 <your message>

more infos to follow soon..

pe@ce out

//Search Giphy and markdown gist results. Can use `::giphy <string>` after creating function in cx.commands
cx.commands.giphy=async(s)=>{ var giphyMarkdown=(gfy)=>`[![${gfy.gfySlug} ${gfy.tags.join(' ')}](${gfy.posterUrl})](${gfy.gifUrl})`; var result=await gfycat.search({search_text:s, count:20}); var gistLink=await gist.paste(result.gfycats.map(x=>giphyMarkdown(x)).join(' '), `${s}-${Date.now()}.md`); return `${s} - ${gistLink}`; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment