Skip to content

Instantly share code, notes, and snippets.

@tanaikech
tanaikech / submit.md
Last active May 8, 2025 06:29
Converting A1Notation to GridRange and vice versa using Google Apps Script without any Scopes

Converting A1Notation to GridRange and vice versa using Google Apps Script without any Scopes

This is a sample script for converting A1Notation to GridRange and vice versa using Google Apps Script without any scopes.

A1Notation and GridRange are often used with Sheets API. I have posted a sample script for converting A1Notation to GridRange before. Ref But, in that case, I used the method of Spreadsheet service (SpreadsheetApp). By this, in order to use the script, it is required to authorize the scopes. In this sample script, A1Notation can be converted to GridRange and vice versa with no scopes. Also, this sample script can be used for Javascript and Node.js.

Sample script

/**
@tanaikech
tanaikech / submit.md
Created November 11, 2020 05:23
Benchmark: Measuring Process Costs for Formulas in Cells on Google Spreadsheet using Google Apps Script

Benchmark: Measuring Process Costs for Formulas in Cells on Google Spreadsheet using Google Apps Script

Description

When Google Spreadsheet is used, there is the case that the built-in functions and the custom functions in the cells are used. For the functions of Google Apps Script, there is the method for measuring the process cost. Ref But for the built-in functions, it is required to create the script for it. In this report, the script for measuring a function put in a cell has been proposed, and the process cost of the built-in functions has been measured. The proposed script can measure the process cost for the built-in functions and custom functions on Google Spreadsheet. The script is created with using Google Apps Script. When the process cost can be known for the built-in functions and custom functions, it is considered that it will be useful for the developers using Google Spreadsheet.

The origin of this method

@rostislavzz
rostislavzz / install-cron-sqlite.sh
Last active April 13, 2022 05:18
Scripts for optimize Plex database to use with Docker container https://github.com/linuxserver/docker-plex. Place "optimize-db.sh" to "/config", and "install-cron-sqlite.sh" to "/config/custom-cont-init.d".
#!/bin/bash
apt-get update && \
apt-get install -y cron sqlite3
apt-get clean
if [ -z "$(crontab -l | grep 'optimize-db.sh')" ]; then
crontab -l | { cat; echo "0 0 1 * * /config/optimize-db.sh 2>&1"; } | crontab -
fi

How to use this?

  1. Install the USB drivers for your device (Google has a list of some universal USB drivers here)
  2. Download the ADB binary for your particular OS (Windows, Mac, Linux)
  3. Extract the zip file into a folder that you can quickly access.
  4. On your phone, go to Settings and tap on About Phone. Find the Build Number and tap on it 7 times to enable Developer Options.
  5. Now enter Developer Options and find USB Debugging. Enable it.
  6. On your computer, browse to the directory where you extracted the ADB binary.
  7. Launch a Command Prompt in your ADB folder. For Windows users, this can be done by holding Shift and Right-clicking then selecting the “open command prompt here” option.
  8. Once you’re in the command

[AIO] Ultimate AdBlocking+AdBypassing Guide (Firefox/Chrome/Brave - Windows/Linux)

Last Updated: September 12, 2023

Why We Need To Block Ads From Internet?

The Internet is a vast space of infinite knowledge. We can store and access those knowledge, those data from everywhere and from any device. We just need to use correct words or phrases to find them. But often what we get is not exactly Safe to See, it's not annoyance-free.

@hthighway
hthighway / gist:d687a9fc07b2af55756e5a8aac94df12
Created August 21, 2018 18:47
Change file path for Plex Media
1 Shutdown plex server
2 Backup your data https://support.plex.tv/hc/en-us/articles/201539237
3 Copy your content to the new location
4 Edit your database. Find the location here: https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database
5 There are 4 edits you'll need to make (change pathing to appropriate values):
UPDATE section_locations
SET root_path= replace(root_path, '/Users/jelwell/Shared', '/Volumes/Movies')
where root_path like '%/Users/jelwell/Shared%'
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active February 26, 2026 06:53
Byte formatting for Google Sheets
@zhy0
zhy0 / ubuntu-cli-install-android-sdk.sh
Last active November 27, 2025 11:09
Install Android SDK on headless Ubuntu linux machine via command line, so that you can compile open source Android apps.
#!/bin/bash
# Thanks to https://gist.github.com/wenzhixin/43cf3ce909c24948c6e7
# Execute this script in your home directory. Lines 17 and 21 will prompt you for a y/n
# Install Oracle JDK 8
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer
apt-get install -y unzip make # NDK stuff
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active January 30, 2026 17:29
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

@onedr0p
onedr0p / simple_convert.py
Last active November 30, 2024 13:48
A simple script to convert media files to MP4 for a better Plex experience
# Python 2.7
import os
import sys
import time
import platform
import subprocess
import urllib2
import logging