Skip to content

Instantly share code, notes, and snippets.

View PedroRajao's full-sized avatar

PedroRajao

  • Prefeitura Municipal de Santos
  • Santos - Brasil
View GitHub Profile
@velitasali
velitasali / deamon.conf
Last active September 29, 2023 15:07
Static noise microphone issue with PulseAudio. On Linux, single channel mic inputs sometimes detected as stereo channel inputs. This causes static noise and unusable experience. To fix it, we need to route the left channel to a mono channel source. We also enable noise cancellation to remove fan and other hardware noises. For more information ht…
# /etc/pulse/
# This change is optional if you are not satisfied with sound quality. Please try different bitrate options and
# use the most compatible one. For instance, you may run "arecord -f dat -r 48000 -D hw:0,0 -d 5 test.wav" to
# record a sample audio. Change the bitrate accordingly by using "r" option.
default-sample-rate = 48000
alternate-sample-rate = 44100
@tanyagupta
tanyagupta / program.js
Created December 5, 2015 21:47
FILTERED LS (Exercise 5 of 13)
var fs = require('fs')
var path = require('path')
fs.readdir(process.argv[2], function (err, list) {
list.forEach(function (file) {
if (path.extname(file) === '.' + process.argv[3])
console.log(file)
})
})
@Starefossen
Starefossen / gist:319f36ff30694a775806
Created August 13, 2015 08:24
Resize VirtualBox .vmdk disk
# http://www.midwesternmac.com/blogs/jeff-geerling/resizing-virtualbox-disk-image
# Clone the .vmdk image to a .vdi.
vboxmanage clonehd "virtualdisk.vmdk" "new-virtualdisk.vdi" --format vdi
# Resize the new .vdi image (30720 == 30 GB).
vboxmanage modifyhd "new-virtualdisk.vdi" --resize 30720
# Optional; switch back to a .vmdk.
VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk
@steventrux
steventrux / Chromecast batch conversion script
Last active May 27, 2021 22:56
A bash script to batch convert video files for chromecast compatibility
#! /bin/bash
# Batch Convert Script by StevenTrux
# The Purpose of this Script is to batch convert any video file to mp4 or mkv format for chromecast compatibility
# this script only convert necessary tracks if the video is already
# in H.264 format it won't convert it saving your time!
# Put all video files need to be converted in a folder!
# the name of files must not have " " Space!
# Rename the File if contain space