Skip to content

Instantly share code, notes, and snippets.

@gabrielmiller
gabrielmiller / readme.md
Created January 22, 2023 04:59
up2414q linux configuration

Unfortunately using this monitor is a little bit of a hassle. On a previous intel-igpu laptop I would occasionally get kernel panics when plugging in the monitor with a usb-c to displayport cord. When that was working, however, sometimes the screen would be organized incorrectly. It is a 4K screen--3840x2160--but apparently is managed by the software as two separate displays--each 1920x2160--left and right of eachother.

I tried this monitor again on a newer laptop, this time using an amd igpu. On wayland it seems to not work, but that might be addressed in kernel 6.1.5, as noted in this thread. In the meanwhile, I switched back to xorg and it works with some manual configuration in xrandr. Here's what I am running:

xrandr --output eDP --auto --pos 0x0 --output DisplayPort-7 --auto --pos 1920x0 --output DisplayPort-8 --auto --pos 3840x0

Note the following:

  • My laptop internal display is output eDP
@gabrielmiller
gabrielmiller / directions.md
Last active February 14, 2021 04:23
up2414q 60hz linux config

Before following these directions you may need to have xrandr 1.5.0, the first version to have virtual displays.

  1. Use xrandr to get a list of displays(xrandr -q) as well as of monitors(xrandr --listmonitors or --listactivemonitors). In this scenario my up2414q showed up as two panels, DP-1-8 and DP-1-9

  2. Create a virtual display with them in order to have them functionally work as one display

    xrandr --setmonitor 24inch auto DP-1-8,DP-1-9

More documentation on xrandr, beyond just manpages, can be found here: http://www.straightrunning.com/tools/xrandr.html#sect3

\[\033[01;33m\]\u\[\033[01;37m\]@\[\033[01;31m\]beryllium \[\033[01;37m\][\[\033[01;34m\]\W\[\033[01;37m\]]\[\033[00;37m\] >
@gabrielmiller
gabrielmiller / gist:c750d3c231c8673683d0
Last active August 29, 2015 14:07
AngularJS URL Parser Service
/**
* @ngdoc service
* @name utilityService
* @description Contains utility methods for formatting
* @requires $interpolate
*/
angular.module('resApp').factory('utilityService', function($interpolate) {
/**
* @ngdoc method
@gabrielmiller
gabrielmiller / gist:b29423113e6a5064a2b0
Last active August 29, 2015 14:06
Directive nesting and scope issues
/**
* There are two directives and two routes. On route 1 the child directive is used directly in the
* view.
* On route 2 the child directive is used inside of the parent directive which is used directly in the
* view.
* In route 1, the controller for the view has a variable that is bidirectionally bound into the child
* controller.
* When the page variable is manipulated from the view's controller as well as inside the child
* directive, the changes are updated in both controller and directive controller.
* In route 2, the link function of the parent directive has a variable that is bidirectionally bound
#!/bin/bash
workdir="" # <<< PWD of project to default search
if [ "$1" != "" ] && [ "$2" != "" ]; then
$GOPATH/src/github.com/monochromegane/the_platinum_searcher/the_platinum_searcher -i -C 3 "$1" "$2"
else
if [ "$1" != "" ]; then
$GOPATH/src/github.com/monochromegane/the_platinum_searcher/the_platinum_searcher -i -C 3 "$1" $workdir
fi
fi
Vagrant.configure("2") do |config|
config.vm.box = "raring64"
config.vm.box_url = "http://cloud-images.ubuntu.com/raring/current/raring-server-cloudimg-vagrant-amd64-disk1.box"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "512"]
end
config.vm.synced_folder ".", "/srv"
<html>
<head>
<title>Periods in object keys</title>
</head>
<body ng-app="example" ng-controller="exampleController">
<h1>Array with periods in its objects' keys</h1>
<input type="text" ng-model="someInput['a.word']"></input>
<ul>
<li ng-repeat="(itemKey, item) in data | filter: someInput">
$http({
method: 'POST',
url: 'http://localhost:8000',
data: parameters
})
.success(function(data, status, headers, config){
var Headers = headers();
console.log(Headers);
})
.error(function(data, status, headers, config){
@gabrielmiller
gabrielmiller / balls.js
Created January 2, 2014 20:04
API Request Filter Object Variations
// "$and" and "$in"
{ "$and" : [
{ "projob.job.department" :
{ "$in" :
[ "Engineering", "Marketing" ]
}
},
{ "projob.rating" : {
"$in" :
[ 3, 4, 5 ]