Skip to content

Instantly share code, notes, and snippets.

@baudryj
baudryj / cut_silence.py
Created October 18, 2021 12:42 — forked from vivekhaldar/cut_silence.py
Python script to cut out silent parts from a video. Uses moviepy.
#!/usr/bin/env python
#
# Based on a script by Donald Feury
# https://gitlab.com/dak425/scripts/-/blob/master/trim_silenceV2
# https://youtu.be/ak52RXKfDw8
import math
import sys
import subprocess
import os

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@baudryj
baudryj / int_trigo.md
Created April 11, 2018 09:17 — forked from sbalev/int_trigo.md
Introducing integer trigonometric functions

Integer trigonometry

Suppose we want to implement a robot moving on integer grid. Usually my code looks like this:

class Robot {
  int x, y;
  int heading; // 0 = East, 1 = North, 2 = West, 3 = South

  void turnLeft() {