Skip to content

Instantly share code, notes, and snippets.

Andrei matzipan

Block or report user

Report or block matzipan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@matzipan
matzipan / gala-wayland.md
Last active Jul 11, 2018
Getting Gala to run with Wayland
View gala-wayland.md

If you're interested in helping with this, join us on IRC: #elementary-dev on irc.freenode.net

Prerequisite: install the xwayland package.

I managed to get Gala to run in a VT with:

dbus-run-session -- gala --display-server --wayland

It even works with just gala --display-server --wayland, but the session still doesn't start.

@matzipan
matzipan / cheatsheet.md
Last active Dec 9, 2018
Vala, GLib and GTK+ cheatsheet
View cheatsheet.md

Building with debug symbols with cmake

cmake -DCMAKE_BUILD_TYPE=Debug .. should do the trick of building the binaries and including the debug symbols.

Enable debug messages

Set the following environment variable G_MESSAGES_DEBUG=all. This will allow you to see messages you print with debug in Vala.

Markup escaping

View keybase.md

Keybase proof

I hereby claim:

  • I am matzipan on github.
  • I am matzipan (https://keybase.io/matzipan) on keybase.
  • I have a public key whose fingerprint is A097 394B 1430 335F CD2A 11E6 FB8D EECC BD87 E38E

To claim this, I am signing this object:

@matzipan
matzipan / README.md
Last active Apr 7, 2016
Generate a hash color for an arbitrary input string with Vala
View README.md

As elementary OS is going to add letter tiles (similar to Android's) to act as default avatars for contacts, there was discussion about the color allocation algorithm. As some of the proposals were about using a boring lookup tables, I decided to try my hand at some hashing and color format conversion.

The algorithm generates a 32 bit hash and squashes it in the [0, 1] interval by dividing it with uint32.MAX. This hash value then gets multiplied with 2*PI and used as the hue component of HSL. This gets converted back to RGB for further manipulation.

@matzipan
matzipan / README.md
Last active Aug 29, 2015
Node.js Raspberry Pi clock source
View README.md
  1. First, you need to install node.js and npm using the following command.
sudo apt-get install nodejs npm node-semver
  1. Second, you need to install the wiring-pi package.
npm install wiring-pi
@matzipan
matzipan / wave.ino
Created Jan 19, 2015
Arduino Christmas rainbow lights
View wave.ino
#include "FastLED.h"
#define DATA_PIN 3
#define CLOCK_PIN 13
#define kMatrixWidth 150
#define kMatrixHeight 1
#define NUM_LEDS (kMatrixWidth * kMatrixHeight)
CRGB leds[kMatrixWidth * kMatrixHeight];
You can’t perform that action at this time.