Skip to content

Instantly share code, notes, and snippets.

@caio2k
caio2k / vbox6 in bionic
Last active March 6, 2019 14:51
vagrantbox improvements
+ add 5GB more in the vm
d-i pkgsel/include string openssh-server nfs-common ntpdate ntp vim ansible build-essential apt-transport-https curl snapd docker-compose virtualbox-guest-x11 git vanilla-gnome-desktop linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
cat /etc/apt/sources.list.d/disco.list
deb http://ubuntu.cica.es/ubuntu/ disco main restricted universe multiverse
cat /etc/apt/preferences.d/disco.pref
about:config
mousewheel.default.delta_multiplier_x;1000
@caio2k
caio2k / alsa-base.conf
Created February 15, 2019 20:42
debian10 audio hiss fix x1c6
#/etc/modprobe.d/alsa-base.conf
snd-hda-intel model=dell-headset-multi
ffmpeg -i file.m4v -b 567k -vf scale=320:-2 -c:v mpeg4 -ab 220k -ar 44100 -ac 2 -c:a aac -strict experimental file320.mp4
#!/bin/bash
#fix robotic voice caused by pulseaudio restarts. inspired by https://winaero.com/blog/fix-broken-sound-skype-linux-8-x/
env PULSE_LATENCY_MSEC=90 /usr/bin/skypeforlinux $1
#/etc/asound.conf
pcm.!default {
type plug
slave.pcm hw
}
#/etc/pulse/daemon.conf
default-sample-format = float32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 2
default-fragment-size-msec = 125
resample-method = soxr-vhq
enable-lfe-remixing = no
@caio2k
caio2k / config.ini
Last active May 14, 2018 22:20 — forked from parkerlreed/config.ini
Support Surface Pro onboard buttons in Debian 9
; Example configuration file for inputexec
[DEFAULT]
; ---traceback : Include full stack trace on exception
#traceback =
## Source
[source]
; --source-file : The source to read from (e.g /dev/input/event0)
file = /dev/input/by-id/usb-MICROSOFT_SAM_0.1.0000-if01-event-mouse
@caio2k
caio2k / README.md
Created February 12, 2018 14:49 — forked from iMilnb/README.md
AWS Terraform configuration: Stream CloudWatch Logs to ElasticSearch

Rationale

This snippet is a sample showing how to implement CloudWatch Logs streaming to ElasticSearch using terraform. I wrote this gist because I didn't found a clear, end-to-end example on how to achieve this task. In particular, I understood the resource "aws_lambda_permission" "cloudwatch_allow" part by reading a couple of bug reports plus this stackoverflow post.

The js file is actually the Lambda function automatically created by AWS when creating this pipeline through the web console. I only added a endpoint variable handling so it is configurable from terraform.

@caio2k
caio2k / install-apache-mesos.sh
Last active August 8, 2017 13:09 — forked from anubhavsinha/install-apache-mesos.sh
Install single node Mesos ( Latest ) cluster on Centos 7.1
sudo yum update
sudo yum install -y tar wget
# Install Mesos dependencies
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
#sudo vi /etc/yum.repos.d/wandisco-svn.repo and add the following content
#[WANdiscoSVN]
#name=WANdisco SVN Repo 1.9
#enabled=1
#baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/
#gpgcheck=1