Skip to content

Instantly share code, notes, and snippets.

View generalsystems's full-sized avatar

General Systems generalsystems

View GitHub Profile
const recorder = new Tone.Recorder();
const synth = new Tone.Synth().connect(recorder);
// start recording
recorder.start();
// generate a few notes
synth.triggerAttackRelease("C3", 0.5);
synth.triggerAttackRelease("C4", 0.5, "+1");
@generalsystems
generalsystems / google-analytics-reporting.js
Last active September 30, 2021 19:15
Pull data from google analytics
// Add this script tag the index.html file
<script src="https://apis.google.com/js/client:platform.js"></script>
// Initialize the library with your credentials
const initialize = () => {
return window.gapi.auth2.init({
client_id: "YOUR_CLIENT_ID", //paste your client ID here
scope: "https://www.googleapis.com/auth/analytics.readonly",
});
};