Skip to content

Instantly share code, notes, and snippets.

@kuo77122
kuo77122 / linux_tips.md
Last active October 20, 2020 06:20
[Linux Tips] #linux

Extract multiple gzip files in directory

gunzip *.gz

Git Aliases

@kuo77122
kuo77122 / jupyter_notebook_tips.md
Last active September 2, 2020 05:52
[Jupyter Notebook Tips] #jupyter

1. Maximum the width of cell

from IPython.core.display import display, HTML
display(HTML("<style>.container { width:90% !important; }</style>"))

2. Display none ASCII words with matplotlib

@kuo77122
kuo77122 / prevent_colab_idle.md
Created April 9, 2020 05:16
[Prevent Colab Idle] #colab

open browser's javascript console

function ClickConnect(){
console.log("Working"); 
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click() 
}
setInterval(ClickConnect,60000)
@kuo77122
kuo77122 / gcp_storage_tips.md
Last active April 9, 2020 04:36
[GCP Storage Tips] #gcp

Copy multiple file in parallel

$ gsutil -m cp -r dir gs://my-bucket

Get the total size of folder, in human-readable form

@kuo77122
kuo77122 / python_in_visual_studio_code.md
Created August 5, 2019 09:30 — forked from ceshine/python_in_visual_studio_code.md
How To Develop Python Programs in Visual Studio Code

How To Develop Python Programs in Visual Studio Code

Prerequisites

You have to already have these in your system:

@kuo77122
kuo77122 / README.md
Created July 30, 2019 04:49 — forked from mill1000/README.md
Headless A2DP Audio Streaming on Raspbian Stretch

About

This gist will show how to setup Raspbian Stretch as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.

Motivation

A quick search will turn up a plethora of tutorials on setting up A2DP on the Raspberry Pi. However, I felt this gist was necessary because this solution is:

  • Automatic & Headless - Once setup, the system is entirely automatic. No user iteration is required to pair, connect or start playback. Therefore the Raspberry Pi can be run headless.
  • Simple - This solution has few dependencies, readily available packages and minimal configuration.
  • Up to date - As of December 2017. Written for Raspbian Stretch & Bluez 5.43

Prerequisites