Skip to content

Instantly share code, notes, and snippets.

@xiaolaba
xiaolaba / submit.md
Created December 27, 2023 04:13 — forked from tanaikech/submit.md
Downloading Files From Google Drive Under No Authorization Using Browser

Downloading Files From Google Drive Under No Authorization Using Browser

This is a sample script for downloading files from Google Drive under no authorization using browser. By using this sample, you can make other users download files from your Google Drive. Even if the other users are not Google users, they can download the files.

Demo

@xiaolaba
xiaolaba / submit.md
Created November 16, 2023 05:58 — forked from tanaikech/submit.md
Uploading Local Files to Google Drive without Authorization using HTML Form

Uploading Local Files to Google Drive without Authorization using HTML Form

This is a sample script for uploading local file to Google Drive without the authorization using HTML form. A selected file in your local PC using HTML form is uploaded to Google Drive and saved to Google Drive.

When you use this, at first, please deploy Web Apps. The script is doPost() of following scripts.

Script : Google Apps Script

function doPost(e) {
 var data = Utilities.base64Decode(e.parameters.data);
@xiaolaba
xiaolaba / esp-idf-on-wsl2.md
Created March 7, 2023 15:03 — forked from abobija/esp-idf-on-wsl2.md
ESP-IDF on WSL2 - Build, Flash and Monitor

ESP-IDF on WSL2 - Build, Flash and Monitor ⚡

Demo

How to setup ESP-IDF on WSL2 Ubuntu 20.04 - Config, Build and Flash

Intro

WSL2 still does not support USB devices, but with a little effort we can make possible to flash and monitor ESP device from WSL2.

@xiaolaba
xiaolaba / Gmail.cs
Last active April 17, 2022 09:18 — forked from AnshulKuthiala/Gmail.cs
[Gmail API] Access Gmail Api from C#
using Google.Apis.Auth.OAuth2;
using Google.Apis.Gmail.v1;
using Google.Apis.Gmail.v1.Data;
using Google.Apis.Services;
using Google.Apis.Util.Store;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
@xiaolaba
xiaolaba / b64.c
Last active March 13, 2021 08:31 — forked from caseyscarborough/b64.c
Base64 implementation in C
// how to compile, win10
// 2021-MAR-13
// install MinWG, https://sourceforge.net/projects/mingw/
// cd C:\MinGW\msys\1.0\
// run msys.bat
// get in msys terminal mode,
// cd "C:/your_file_path_of_b64.c/"
// gcc b64.c -o b64.exe
@xiaolaba
xiaolaba / AudioRecordActivity.java
Created May 9, 2020 09:36 — forked from kmark/AudioRecordActivity.java
An example of how to read in raw PCM data from Android's AudioRecord API (microphone input, for instance) and output it to a valid WAV file. Tested on API 21/23 on Android and API 23 on Android Wear (modified activity) where AudioRecord is the only available audio recording API. MediaRecorder doesn't work. Compiles against min API 15 and probabl…
/*
* Copyright 2016 Kevin Mark
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software

Controlling 27.145 MHz BOSE Lifestyle with Raspberry Pi

I want to tie my BOSE Lifestyle system into my smart home control setup like this:

mute

The Remote Control RC9 for BOSE Lifestyle 3, 5, 8, 12 systems is using radio rather than infrared. Also, since these systems do not have other ways to control them, it is difficult to integrate them into home automation setups. Also, there are no replacement remotes available and even worn-down used original remotes go for absurd prices on eBay.

This is why I was curious how these devices could be controlled using the apparently proprietary radio signals.