Skip to content

Instantly share code, notes, and snippets.

@cbarraco
cbarraco / arch-bootstrap
Created December 14, 2015 05:57
Install a bunch of stuff I like for a fresh install of arch
#!/bin/sh
# install pacaur
cd
sudo pacman -S --noconfirm wget expac git
wget https://aur.archlinux.org/cgit/aur.git/snapshot/cower.tar.gz
tar -xvf cower.tar.gz
cd cower
makepkg --skipinteg
sudo pacman -U cower-14-2-x86_64.pkg.tar.xz
@cbarraco
cbarraco / ffmpeg screen sharing
Last active December 24, 2023 09:46
The poor man's VNC. If you have ffmpeg and netcat you can stream your screen across your network with two one-liners
# If the server has ffmpeg:
## For the server:
ffmpeg -f fbdev -i /dev/fb0 -f avi pipe:1 | nc -l -p 1234
## For the viewer:
nc 127.0.0.1 1234 | ffplay -i pipe:0
# If the server doesn't have ffmpeg:
## For the server:
sudo cat /dev/fb0 | nc -l -p 1234
## For the viewer (replace 1920x1080 with the server's resolution):
@cbarraco
cbarraco / taking screenshot in linux with C
Created October 7, 2015 15:11 — forked from bozdag/taking screenshot in linux with C
This C program takes the whole screenshot of the root window for a given display and saves it in PNG file format.
/*
Grabs a screenshot of the root window.
Usage : ./scr_tool <display> <output file>
Example : ./scr_tool :0 /path/to/output.png
Author: S Bozdag <selcuk.bozdag@gmail.com>
*/
@rem *** Disable Some Service ***
sc stop DiagTrack
sc stop diagnosticshub.standardcollector.service
sc stop dmwappushservice
sc stop WMPNetworkSvc
sc stop WSearch
sc config DiagTrack start= disabled
sc config diagnosticshub.standardcollector.service start= disabled
sc config dmwappushservice start= disabled
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
@cbarraco
cbarraco / .conkybar
Created March 1, 2015 23:18
My conky bar
double_buffer yes
own_window yes
own_window_transparent no
own_window_type override
own_window_hints sticky
draw_borders no
alignment top_left
update_interval 1
default_color 857d59
own_window_colour 1a1a1a
@cbarraco
cbarraco / How to compile and install i3 with gaps
Last active May 20, 2016 16:13
Compile and install i3 with gaps
To Compile and Install i3-gaps:
git clone https://github.com/Airblader/i3.git && cd i3
sudo apt-get build-dep i3
sudo make && sudo make install
To Fix Titlebars:
for_window [class="^.*"] border pixel 0
sudo grep -lr -e 'd64937' * | sudo xargs sed -i 's/d64937/019875/g'
style "darkback"
{
bg[NORMAL] = "#404040"
bg[ACTIVE] = "#606060"
bg[PRELIGHT] = "#808080"
fg[NORMAL] = "#ccc"
fg[ACTIVE] = "#fff"
fg[PRELIGHT] = "#fff"
}
widget "whiskermenu-window*" style "darkback"
cp /usr/share/vim/vim74/vimrc_example.vim ~/.vimrc