Skip to content

Instantly share code, notes, and snippets.

View mattiasb's full-sized avatar

Mattias Bengtsson mattiasb

View GitHub Profile
@mattiasb
mattiasb / 99-touchpad-fixes.sh
Created March 22, 2014 15:37
Touchpad fix on Ideapad Yoga 2 pro
#!/bin/bash
# I put this in /etc/X11/xinit/xinitrc.d/99-touchpad-fixes.sh
xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Accel Profile" 2
xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Accel Constant Deceleration" 4
xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Accel Adaptive Deceleration" 4
xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Accel Velocity Scaling" 8
xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Finger" 35 45 0
xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Coasting Speed" 5 15
const Transportation = {
CAR: 0,
BIKE: 1,
PEDESTRIAN: 2
};
Transportation.toString = function toString(transportation) {
};
@mattiasb
mattiasb / Makefile
Created May 26, 2014 04:07
Makefile for initializing tz_world.sqlite
all: tz_world.sqlite
tz_world.sqlite: tz_world.zip /usr/bin/spatialite_tool
unzip tz_world.zip
spatialite_tool -i -shp world/tz_world -t tz_world -d tz_world.sqlite -c CP1252
rm -r world
tz_world.zip: /usr/bin/curl
curl "http://efele.net/maps/tz/world/tz_world.zip" -o tz_world.zip
<object class="GtkGrid" id="no-network-conn-message">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin-start">15</property>
<child>
<object class="GtkLabel" id="message1">
<attributes>
<attribute name="weight" value="bold" />
<attribute name="scale" value="2.0" />
</attributes>
@mattiasb
mattiasb / gist:c84ab498d444df108bf7
Created October 13, 2014 18:52
Mmm JavaScript.
// test.js
let v1 = "wee";
let v2 = "gaah";
function test() {
return
[v1,v2].join(' ');
}
From 9f923390a77e9d5b950f100e2194c4b084a2a0bb Mon Sep 17 00:00:00 2001
From: Mattias Bengtsson <[email protected]>
Date: Tue, 28 Oct 2014 00:48:27 +0100
Subject: [PATCH] WIP: Template of layers-popover
---
src/layers-popover.ui | 93 +++++++++++++++++++++++++++------------------------
src/layersPopover.js | 21 +++++++-----
2 files changed, 62 insertions(+), 52 deletions(-)
@mattiasb
mattiasb / templates-discussion
Created November 10, 2014 15:47
Templates discussion
mattiasb Is it possible to put your own custom classes inside
gtkbuilder ui-files? Or do you need to do work on the
gtkbuilder side for that to work?
baedert you mean custom widgets?
mattiasb And if it works: does it also work for, say, gjs?
mattiasb baedert: ah, yeah exactly
xjuan mattiasb, yes you can
xjuan what I do not remember is if you need to have your
class referenced or not
mattiasb What I'm after is to have a main-window.ui file be a
@mattiasb
mattiasb / twitch.lua
Created January 5, 2015 04:56
Twitch.tv grilo plugin
--[[
* Copyright (C) 2015 Mattias Bengtsson
*
* Contact: Mattias Bengtsson <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; version 2.1 of
* the License, or (at your option) any later version.
*
@mattiasb
mattiasb / git-spindle.completion.bash
Created May 2, 2015 00:56
Current snapshot of git-spindle.completion.bash
#!/bin/bash
# Copyright ⓒ 2015 Mattias Bengtsson
#
# git-spindle is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# git-spindle is distributed in the hope that it will be useful,
bd = "!f() { git for-each-ref --sort=committerdate refs/heads/ --format='%(refname:short):%(committerdate:relative)'; }; f | column -t -s ':'"