Skip to content

Instantly share code, notes, and snippets.

function NFetch(url, request, callBack) {}; // Makes async HTTP request and returns the response in the following update frame.
class Headers {
// This is essentially a list of keys that have a bunch of functions to act on them. The JS functions below act upon a list of headers.
// When you are ready to make the call with CURL, you're going to iterate over this JS list and append them with:
// headers = curl_slist_append(headers, "Content-Type: text/xml"); <-- Inserting data as below
//
// i.e.
// struct curl_slist *headers=NULL;
function HTTPCall(HTTPRequest); // Makes async HTTP request and returns the response in the following update frame.
class HTTPRequest {
constructor(url, onComplete) {
this.url = url; // URL to get data from
this.onComplete = onComplete; // The function that will be called the next update cycle after the request has completed.
this.method = "GET"; // "GET", "POST", "PUT", "DELETE"
this.payload = ""; // Payload when using POST or PUT
this.timeout = 5; // Number of seconds to wait for a response. default = 5 seconds
@bentstamnes
bentstamnes / gist:558f12ab6db60c9cc560
Created October 13, 2015 21:05
Fuse OS X uninstall script
# OS X Fuse uninstallation script
# Paste in terminal to uninstall Fuse and Fuse plugin for Sublime Text 3
sudo rm -rf \
/Applications/Fuse.app \
/usr/local/bin/fuse \
/usr/local/bin/uno \
/usr/local/bin/unotest \
/usr/local/share/Uno \
"$HOME/.fuse" \