Skip to content

Instantly share code, notes, and snippets.

View bkmeneguello's full-sized avatar

Bruno Meneguello bkmeneguello

View GitHub Profile
#!/bin/bash
ffmpeg -y -f alsa -ac 2 -ar 128000 -ab 160k -i pulse -f x11grab -r 30 -s `xdpyinfo | grep 'dimensions:'|awk '{print $2}'` -i :0.0 -sameq -threads 0 $FILE
#!/bin/bash
x11vnc -shared -viewonly -ncache 10
#!/bin/bash
ffmpeg -f video4linux2 -r 25 -s 640x480 -i /dev/video0 -sameq $FILE
#!/bin/bash
trap '<some command>' EXIT #XXX of SIG_XXX
<more commands> & #send to bg
wait #wait bg commands
#!/bin/bash
xprop _NET_WM_PID #PID da janela selecionada
#!/bin/bash
sox $IN_FILE -r $RATE -b $BITS $OUT_FILE
@bkmeneguello
bkmeneguello / skelfs.c
Created June 28, 2013 12:58
FUSE implementation skelekton
/*
FUSE: Filesystem in Userspace
Copyright (C) 2013 Bruno Meneguello
This program can be distributed under the terms of the GNU GPL.
gcc -Wall skelfs.c `pkg-config fuse --cflags --libs` -o skelfs
*/
#define FUSE_USE_VERSION 26
@bkmeneguello
bkmeneguello / shader.cpp
Created July 21, 2013 00:49
OpenSceneGraph Shader 4.00
#include <osg/ArgumentParser>
#include <osg/Array>
#include <osg/Camera>
#include <osg/Drawable>
#include <osg/Geode>
#include <osg/Geometry>
#include <osg/Group>
#include <osg/Light>
#include <osg/Matrixd>
#include <osg/MixinVector>
@bkmeneguello
bkmeneguello / rename-photos
Created January 21, 2014 01:12
Rename files based on folder's name
#!/bin/bash
i=1
for f in $(ls); do
printf "mv %s %s_%03d.jpg\n" $f $(basename $(pwd)) $i
i=$(expr $i + 1)
done
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;