Skip to content

Instantly share code, notes, and snippets.

View arcusfelis's full-sized avatar

Michael Uvarov arcusfelis

View GitHub Profile

Logitech c310 in Ubuntu 12.04 x64

edit /usr/share/applications/skype.desktop

[Desktop Entry]
Name=Skype
Comment=Skype Internet Telephony
Exec=bash -c 'LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l2convert.so skype %U'
[{9,<<"<control>">>},
 {10,<<"<control>">>},
 {12,<<"<control>">>},
 {13,<<"<control>">>},
 {32,<<"SPACE">>},
 {160,<<"NO-BREAK SPACE">>},
 {5760,<<"OGHAM SPACE MARK">>},
 {6158,<<"MONGOLIAN VOWEL SEPARATOR">>},
 {8192,&lt;&lt;"EN QUAD"&gt;&gt;},
@arcusfelis
arcusfelis / gist:5648666
Created May 25, 2013 10:44
Libreoffice Calc: print ranges for all pages
REM ***** BASIC *****
' Fit print range on page
sub AutoScaleSheet
view = thiscomponent.getCurrentController()
fam =thiscomponent.stylefamilies.getbyname("PageStyles")
sh = view.getActivesheet()
style = fam.getbyname(sh.PageStyle)
style.ScaleToPagesX = 1
style.ScaleToPagesY = 1
@arcusfelis
arcusfelis / gist:4523887
Last active December 11, 2015 01:29
Make "Clock rate Selector" persistent for E-MU 0204
  • Configure in alsamixer
  • Run
# alsactl store
  • Put this to /etc/rules.d/90-persistent-audio.rules
@arcusfelis
arcusfelis / gist:4523836
Created January 13, 2013 12:28
Where is udevinfo?
udevinfo -a -p /dev/audio1

was replaced with

udevadm info -a -p  $(udevadm info -q path -n /dev/audio1)
@arcusfelis
arcusfelis / .asoundrc
Created January 12, 2013 18:28
.asoundrc for Creative E-MU 0204 USB audiocard
# .asoundrc for Creative E-MU 0204 USB audiocard.
pcm.!default emu
pcm.emudev "hw:1,0"
pcm.emu
{
type asym
playback.pcm
{
type plug
-module(general_proper_tests).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
some_cool_test_() ->
Properties = lists:filter(fun({F, _}) ->
case atom_to_list(F) of
"prop_" ++ _Rest -> true;
_ -> false
@arcusfelis
arcusfelis / delete_duplicate.erl
Created November 26, 2012 18:03
Delete all duplicates of a single element from the string
delete_duplicate(E, [E|T]) ->
T2 = [X || X <- T, X =/= E],
[E|T2];
delete_duplicate(E, [H|T]) ->
[H|delete_duplicate(E, T)];
delete_duplicate(_E, []) ->
[].
login: arcusfelis
email: arcusfelis@gmail.com
university: Southern Federal University
@arcusfelis
arcusfelis / funs.erl
Created November 11, 2012 19:16
Funs
-module(funs).
-export([f1/0, f2/0]).
id(X) -> X.
id_fn() -> fun id/1.
%% Returns `false'.
f1() ->
id_fn() =:= fun id/1.