Skip to content

Instantly share code, notes, and snippets.

@MatejLach
MatejLach / PKGBUILD
Created December 30, 2018 13:29
edrawmax
# Maintainer: kitech1 <[email protected]>
pkgname=edrawmax
pkgver=9.3
pkgrel=1
pkgmaver=9
pkgmaname=EdrawMax
epoch=
pkgdesc="All-in-One Diagram Software"
arch=('x86_64')
url="http://www.edrawsoft.cn/edrawmax/"
[Unit]
Description=PulseAudio Sound System
Before=sound.target
[Service]
User=pi
Type=simple
BusName=org.pulseaudio.Server
ExecStart=/usr/bin/pulseaudio
Restart=always
@MatejLach
MatejLach / restore_from_bundles.sh
Created September 10, 2018 12:41
Restore code from GitLab .bundle files
#!/bin/bash
RESTORE_FOLDER = /path/to/the/folder/where/you/want/the/code
for i in $(find `pwd` -name *.bundle); do
git clone --mirror $i $(RESTORE_FOLDER)/$(basename $i .bundle).git
cd $(RESTORE_FOLDER)
mkdir $(basename $i .bundle)
cd $(basename $i .bundle).git
git archive master | (cd ../$(basename $i .bundle) && tar x)
@MatejLach
MatejLach / asound.conf
Created September 4, 2018 21:48
Alsa config for Pi carwarings
pcm.mic {
type plug
slave {
pcm "hw:1,0"
}
}
pcm.speakerbonnet {
type hw card 0
}

Keybase proof

I hereby claim:

  • I am matejlach on github.
  • I am matejlach (https://keybase.io/matejlach) on keybase.
  • I have a public key ASDeZ_P8SeBjxLxDy8msngThxsarPrPHpVVoJQhtHQMSIQo

To claim this, I am signing this object:

/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+apacheconf+bash+c+cpp+coffeescript+css-extras+dart+erlang+fsharp+git+go+haml+handlebars+haskell+http+jade+java+julia+latex+less+markdown+nasm+perl+php+php-extras+python+r+jsx+rest+ruby+rust+sas+scss+scala+sql+swift+typescript+wiki+yaml&plugins=autolinker+file-highlight+show-language+highlight-keywords */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
@MatejLach
MatejLach / struct.rs
Last active August 29, 2015 14:04
Showcases a Rust struct...
fn main() {
struct Date {
m: int,
y: int
}
let today = Date {m: 8i, y: 2014i};
println!("\"August\" is the {}th month in {} (and every other year)", today.m, today.y); // access individual fields
}
@MatejLach
MatejLach / tuples.rs
Created August 4, 2014 16:24
How to use tuples in Rust...
fn main() {
let date = ("Today", 4i, 8i, 2014i); // simple tuple
println!("{}", date);
let (wd, d, m, y) = ("Today", 4i, 8i, 2014i); // destructuring let
println!("{} is {}/{}/{}", wd, d, m, y); // accessing individual variables from the tuple
}
@MatejLach
MatejLach / integer_addition.rs
Created August 4, 2014 10:23
Showcases integer addition using a function in Rust...
use std::io;
fn add(x: int, y: int) -> int { // takes two integers and returns an integer
x + y
}
fn main() {
println!("Simple Addition Calculator, written in Rust!");
println!("Enter 1st number: ");
@MatejLach
MatejLach / user_input.rs
Created August 2, 2014 15:03
Showcases standard input in Rust...
use std::io;
fn main() {
println!("Type something:");
let input = io::stdin()
.read_line() // read user input
.ok().expect("unable to read input!"); // Display this in case of a problem reading user input
// convert to &str and get rid of the newline