Skip to content

Instantly share code, notes, and snippets.

View giswqs's full-sized avatar

Qiusheng Wu giswqs

View GitHub Profile
# This script relies on the magick library, see this vignette for more information:
# https://cran.r-project.org/web/packages/magick/vignettes/intro.html
#
# If you have Windows or Mac OS, I believe ImageMagick STL is integrated with the CRAN distribution
# of the R magick library. If on Linux, see the "Build from source" section of the above URL
#
# This script will add year annotations from GIF animations generated and downloaded from the
# LT-GEE Time Series Animator open access Earth Engine App:
# https://emaprlab.users.earthengine.app/view/lt-gee-time-series-animator
#
@kemingy
kemingy / auto_deploy_blog.md
Created August 6, 2018 11:41
Auto deploy blog generated by jekyll with jekyll-archives

Auto-Deploying Blogs to GitHub Pages with Travis CI

GitHub Pages doesn't support jekyll-archives now PR. We can use Travis CI to build it and push to gh-pages branch.

There is already some gists talks about this topic using bash. However, Travis now support deploy in .travis.yml , which is super easy to set up. (Deploying to GitHub Pages is experimental now [2018.07.25])

Create .travis.yml File

Here is an example.

@nishadhka
nishadhka / rastermerege-rasterio,py
Created July 30, 2017 12:05
Raster merge using rasterio
import rasterio.merge
bounds=None
res=None
nodata=None
precision=7
def merge(input1,bounds, res, nodata, precision):
import warnings
warnings.warn("Deprecated; Use rasterio.merge instead", DeprecationWarning)
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active April 30, 2025 07:12
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

@fabricebrito
fabricebrito / sentinel1.md
Last active September 24, 2020 06:17
Download ESA Sentinel-1 data from Sentinel-1 Scientific Data Hub (https://scihub.esa.int/dhus/)

Download ESA Sentinel-1 data from Sentinel-1 Scientific Data Hub (https://scihub.esa.int/dhus/)

Create a Sentinel-1 Scientific Data Hub account

Go here: https://scihub.esa.int/dhus/ and look for a "Register" link. Follow the registration steps.

Get aria2

aria2 is a lightweight multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, BitTorrent and Metalink.