Skip to content

Instantly share code, notes, and snippets.

View dschreij's full-sized avatar

Daniel Schreij dschreij

View GitHub Profile
@dschreij
dschreij / LocationAutocomplete.vue
Last active May 7, 2022 20:48
Location autocomplete field using the Google Places API and Vuetify's v-combobox
<template>
<v-combobox
v-bind="$attrs"
item-text="description"
item-value="description"
:search-input.sync="query"
:loading="loading"
:items="results"
v-on="$listeners"
@input="handleInput"
@dschreij
dschreij / setup_monitors.sh
Last active August 6, 2020 07:58
This is the script that I use for setting up my display scaling correctly on Ubuntu using `xrandr`. I have a 1920x1200 display on the left side connected on HDMI. On the right side I have a 4k display connected via display port. You can obtain the list of connected monitors and their respective ports using `xrandr query`.
#!/bin/sh
gsettings set org.gnome.desktop.interface scaling-factor 2
xrandr \
--dpi 162 \
--output USB-C-0 --off \
--output HDMI-0 --mode 1920x1200 --scale 2x2 --pos 0x0 --rotate normal \
--output DP-2 --primary --mode 3840x2160 --pos 3840x0 --scale 1.1x1.1 --rotate normal
echo "Xft.dpi: 162" | xrdb -merge
@dschreij
dschreij / client.py
Last active August 29, 2015 14:00
Transferring image data from pupil_server to a client over zmq
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 10 15:44:47 2014
@author: Daniel Schreij
"""
import zmq
import pygame
from OpenGL.GL import *