Skip to content

Instantly share code, notes, and snippets.

View valenzine's full-sized avatar

Valentín Muro valenzine

View GitHub Profile

Overview

FTP blows and you want to simply git push hostgator master out to your desired directory. It's pretty easy.

Assumptions

  • You've gotten Hostgator to authorize you to use SSH
  • The server has git
  • You know that Hostgator uses port 2222 for SSH
@valenzine
valenzine / ffmpeg_extract_audio.md
Created April 29, 2022 14:19
Extract audio with FFmpeg

To extract the audio stream without re-encoding:

ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac

-vn is no video. -acodec copy says use the same audio stream that's already in there.

Read the output to see what codec it is, to set the right filename extension.

@valenzine
valenzine / get_mailchimp_campaigns_via_API.gs
Last active May 10, 2022 16:48
Basic Google Script for loading a Google Sheets with reports
// This code is based upon the one posted by @leonidas.yovan on Medium
// https://medium.com/@leonidas.yovan/connect-your-mailchimp-campaign-data-to-google-datastudio-for-free-fd7b5f2dec40
// The main difference is the split into two functions
// and the replication of Mailchimp headers in the spreadsheet
// for broader compatibility.
var API_KEY = 'API_KEY'; // MailChimp API Keyvar
var ss = SpreadsheetApp.openById('SHEETS_ID');
var sheet = ss.getSheetByName("campaigns");