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() {
@baudryj
baudryj / twitter_codeigniter
Created June 13, 2013 12:09
twitter codeigniter
public function index()
{
$this->load->library('twitteroauth');
$connection = $this->twitteroauth->create("MiQDDYJCjO345iqIwEFA", "mEooj5IxB58rL9Ku1JYNDohgmrYccMStiPGIBNTUw9M", "91083851-zyABcTEs62pTaeIncamH1PJN8p81Va0uycS6aCHJk", "OG2PI8Bc3AxjyKAOp2jn7QXkaoRP9ptGK6tACWI4k");
//$content = $connection->get('account/verify_credentials');
//$content = $connection->get('https://api.twitter.com/1.1/users/search.json?q=armada%20rouen&page=1&count=3');
//$content = $connection->get('https://api.twitter.com/1.1/geo/search.json?query=rouen');
//$content = $connection->get('https://api.twitter.com/1.1/geo/id/4fb6ac0e7b585584.json');
//$content = $connection->get('http://twitter.com/search?q=place%3A4fb6ac0e7b585584');
$content = $connection->get('https://api.twitter.com/1.1/search/tweets.json?q=place%3A4fb6ac0e7b585584&since_id=24012619984051000&max_id=250126199840518145&result_type=mixed&count=4');
@baudryj
baudryj / ldap
Created June 12, 2013 09:04
ldap connection
<?php
?>