This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo vim /etc/pulse/default.pa | |
## Append the following | |
================================================================================================================= | |
### Enable Echo/Noise-Cancelation | |
.ifexists module-echo-cancel.so | |
load-module module-echo-cancel aec_method=webrtc source_name=echocancel sink_name=echocancel1 | |
set-default-source echocancel | |
set-default-sink echocancel1 | |
.endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference | |
1. https://askubuntu.com/questions/1356207/cam-link-4k-was-working-but-now-it-isnt | |
2. https://askubuntu.com/questions/1245212/how-do-i-automatically-run-modprobe-v4l2loopback-on-boot | |
$ sudo echo "modprobe v4l2loopback max_buffers=2 devices=1 exclusive_caps=1" >> /etc/modules-load.d/v4l2loopback.conf | |
$ ffmpeg -f v4l2 -framerate 50 -pix_fmt yuyv422 -video_size 1920x1080 -i /dev/video1 -f v4l2 -vcodec rawvideo -pix_fmt yuv420p /dev/video0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install -y snapd vim openvpn | |
sudo snap install docker | |
sudo groupadd docker | |
sudo usermod -aG docker ${USER} | |
sudo snap install code --classic | |
sudo snap install slack --classic | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Get the procs sorted by the number of inotify watchers | |
# | |
# From `man find`: | |
# %h Leading directories of file's name (all but the last element). If the file name contains no slashes (since it | |
# is in the current directory) the %h specifier expands to `.'. | |
# %f File's name with any leading directories removed (only the last element). | |
lines=$( | |
find /proc/*/fd \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2.2' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.0 | |
container_name: es | |
environment: | |
- discovery.type=single-node | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
ulimits: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -nNT -L 9201:vpc-production-assets-v6-lwgs7pt5lnoriviryns2ic7iqu.us-east-1.es.amazonaws.com:80 [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const Promise = require('bluebird'); | |
let _updateResults = () => { | |
let promises = []; | |
for (let offset = 0; offset < 10; offset += 1) { | |
promises.push(new Promise(resolve => _updateResultsInChunk(offset).then(resolve))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE EXTERNAL TABLE events ( | |
name string, | |
user string, | |
variation string, | |
referrer string, | |
timestamp string, | |
metadata string | |
) | |
ROW FORMAT serde 'org.openx.data.jsonserde.JsonSerDe' | |
with serdeproperties ( 'paths'='name, user, variation, referrer, timestamp, metadata' ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE EXTERNAL TABLE IF NOT EXISTS sampledb.widget_access_log ( | |
`date` date, | |
`time` string, | |
`location` string, | |
`bytes` int, | |
`request_ip` string, | |
`method` string, | |
`host` string, | |
`uri` string, | |
`status` int, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myssid=$(iwgetid -r) | |
if [[ $myssid == "NewsCred Inc" ]]; then | |
echo "In office" | |
/bin/bash -l -c '/home/jitu/Software/pycharm/bin/pycharm.sh' %f & | |
gnome-terminal --maximize --working-directory=/home/jitu/projects/marketingplatform | |
else | |
echo "Out of office" | |
fi |
NewerOlder