Skip to content

Instantly share code, notes, and snippets.

View ductrung-nguyen's full-sized avatar

Duc Trung NGUYEN ductrung-nguyen

View GitHub Profile
@ductrung-nguyen
ductrung-nguyen / rcabook-setup.sh
Created April 2, 2021 18:17 — forked from rcubetrac/rcabook-setup.sh
Roundcube LDAP Setup
#!/bin/bash
#------------configuration--------------------------------
# the url of the openldap server
server="ldap://localhost:389";
# the static config file of openldap
config="/etc/ldap/slapd.conf";
# the LDAP base suffix and admin rootdn
@ductrung-nguyen
ductrung-nguyen / clean_audio.sh
Created June 5, 2020 10:12 — forked from devoncrouse/clean_audio.sh
Using Sox (http://sox.sourceforge.net) to remove background noise and/or silence from audio files (individually, or in batch).
# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof
# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21
# Remove silence from mp3
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5%
# Remove noise and silence in a single command
@ductrung-nguyen
ductrung-nguyen / sshtunnel.go
Created June 19, 2018 06:08 — forked from iamralch/sshtunnel.go
SSH tunnelling in Golang
package main
import (
"log"
"bufio"
"time"
"os"
"fmt"
"io"
"net"