Skip to content

Instantly share code, notes, and snippets.

View joncode's full-sized avatar
🏠
Working from home

Jon Gutwillig joncode

🏠
Working from home
View GitHub Profile
@joncode
joncode / SaveAudioBufferToWavFile.cpp
Created March 15, 2021 05:38 — forked from ruben44100/SaveAudioBufferToWavFile.cpp
JUCE, save AudioBuffer to Wav file
AudioBuffer<float> buffer;
buffer.setSize(2, 10000);
// do something with buffer
File file("D:/test.wav");
file.deleteFile();
WavAudioFormat format;
std::unique_ptr<AudioFormatWriter> writer;

Let’s assume we have an existing project called ‘foo’ and we want to create a fork called ‘bar’.

First, create a new project on GitHub called ‘bar’.

Next, clone foo using the name ‘bar’:

$ git clone [email protected]:YOURNAME/foo.git bar
$ cd bar

Next, edit your Git config file and replace the origin URL with your new URL:

@joncode
joncode / jquery.replaceWith.example
Created April 27, 2012 23:13 — forked from robertSahm/jquery.replaceWith.example
jQuery replace with exampe
$('.guitarClick1 a').click(function() {
$('h2.chooseInstrument').replaceWith('<h2 class="chooseInstrument">Step 2: Choose a body style</h2>');
})