Skip to content

Instantly share code, notes, and snippets.

View asafamr's full-sized avatar

Asaf Amrami asafamr

View GitHub Profile
@jl2
jl2 / readaudio.c
Created January 26, 2012 06:33
Use ffmpeg's libavcodec and libavformat to decode an audio file into an output buffer.
/*
readmp3.c
Copyright (c) 2012, Jeremiah LaRocco [email protected]
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
@hfreire
hfreire / upload_download_to_from_aws_glacier_using_aws.sh
Last active March 10, 2022 07:48
Upload/download to/from AWS Glacier using aws-cli
# create a vault
aws glacier create-vault --account-id - --vault-name my-vault-name
# check that the vault was created successfully
aws glacier describe-vault --account-id - --vault-name my-vault-name
# upload a file to the vault
aws glacier upload-archive --vault-name my-vault-name --account-id - --archive-description "my-archive-description" --body my-text-file.txt
# request an inventory of the vault
@interfect
interfect / castanet.sh
Last active November 17, 2024 15:19
Set up a Chromecast from a Linux PC, without an Android or iOS mobile device and without Google Home
#!/usr/bin/env bash
# castanet.sh: Script to connect a chromecast to a WiFi network.
#
# Allows you to put your Chromecast on WiFi and do Chromecast initial setup
# without using the Google Home app at all, just using a normal Linux computer.
#
# You do need your Chromecast to be on Ethernet, or (untested) to join its setup WiFi
# network with your PC, and you also need to find out its IP yourself with e.g.
# Wireshark.