Skip to content

Instantly share code, notes, and snippets.

View jkazimierczak's full-sized avatar

jkazimierczak

View GitHub Profile
@magickatt
magickatt / service_account.tf
Created May 19, 2020 19:43
Create Google Cloud Platform service account credentials JSON using Terraform
resource "google_service_account" "service_account" {
account_id = "test
display_name = "Test"
}
resource "google_service_account_key" "service_account" {
service_account_id = google_service_account.service_account.name
public_key_type = "TYPE_X509_PEM_FILE"
}
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active June 7, 2024 09:39
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@oleq
oleq / _README.md
Last active January 7, 2024 10:38
A2DP audio streaming using Raspberry PI (Raspbian Jessie)

What is this all about?

This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.

   Audio source (i.e. smartphone) 
                |
                v
 (((  Wireless Bluetooth Channel  )))
 |
@jasonpierrepont
jasonpierrepont / scantree.py
Last active October 8, 2022 23:19
Python os.walk with DirEntry results instead of path strings. If not using python 3.5+ you'll need to have the scandir package installed. Currently, this is a simple implementation and does not fully replicate the functionality of os.walk.
try:
from os import scandir
except ImportError:
from scandir import scandir
def scantree(path):
subs = []
files = []
for entry in scandir(path):
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//