Skip to content

Instantly share code, notes, and snippets.

View matthiasotto's full-sized avatar

Matthias Otto matthiasotto

  • Motto Software
  • Edmonton, AB
View GitHub Profile
@ninokierulf
ninokierulf / git-rebase-interactive-sublimetext.md
Last active February 18, 2020 17:32
Use 'Sublime Text' for git rebase interactive
@babakness
babakness / disable-back-gesture-on-mac-by-browser.md
Last active February 20, 2024 19:17
A list of commands to disable the back gesture for Chrome, FireFox, Brave, and Safari

When working with online editor, the back gesture on a Mac can become very frustrating. Here are some helpful commands disable the back gesture:

# Disable back gesture in specific apps

# Chrome
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE
# FireFox
defaults write org.mozilla.firefox AppleEnableSwipeNavigateWithScrolls -bool FALSE
# Brave
@kakajika
kakajika / flatMapCompletable.swift
Created February 16, 2018 10:02
Single::flatMapCompletable in RxSwift
extension PrimitiveSequenceType where Self: ObservableConvertibleType, Self.TraitType == SingleTrait {
func flatMapCompletable(_ selector: @escaping (E) -> Completable) -> Completable {
return self
.asObservable()
.flatMap { e -> Observable<Never> in
selector(e).asObservable()
}
.asCompletable()
}
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active May 13, 2024 10:18
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

@cbadke
cbadke / config-dev-machine.ps1
Last active March 10, 2017 16:49
Scripts to automatically configure a bare-bones Windows dev env. To use: iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/cbadke/85c983e2b99240ab0ef0/raw/config-dev-machine.ps1'))
#install Chocolatey
iex (new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')
#install PsGet
iex (new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1")
Install-Module PSReadLine
cinst githubforwindows -y
cinst gitextensions -y
cinst vim -y