Skip to content

Instantly share code, notes, and snippets.

View oddbjornkvalsund's full-sized avatar

Oddbjørn Kvalsund oddbjornkvalsund

View GitHub Profile
@oddbjornkvalsund
oddbjornkvalsund / modinfo.txt
Created April 23, 2019 09:56
modinfo snd_hda_codec_realtek
filename: /lib/modules/5.0.0-13-generic/kernel/sound/pci/hda/snd-hda-codec-realtek.ko
description: Realtek HD-audio codec
license: GPL
srcversion: 2153525906C8C810CD9A72F
alias: hdaudio:v10EC1220r*a01*
alias: hdaudio:v10EC1168r*a01*
alias: hdaudio:v10EC0900r*a01*
alias: hdaudio:v10EC0899r*a01*
alias: hdaudio:v10EC0892r*a01*
alias: hdaudio:v10EC0889r*a01*
# Powertop auto-tune
cat > /usr/local/bin/powerkeepalive << EOF
#!/bin/bash
for usbdevice in \$(find /sys/bus/usb/devices/); do test -w \${usbdevice}/power/control && echo on > \${usbdevice}/power/control; true; done
echo 0 > /sys/module/snd_hda_intel/parameters/power_save
EOF
chmod +x /usr/local/bin/powerkeepalive
# TODO after calling usbkeepalive, just get rid of audio static/noise:
# https://osxlatitude.com/forums/topic/11316-how-to-fix-static-noisedistortioncrackling-sound-and-combojack-in-laptops/
#!/bin/bash
set -x
set -e
# Function to add line to file if not already present
function add_line() {
local line=$1
local file=$2
touch $file
grep -q "$line" "$file" || echo -e "$line" >> "$file"
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
Subsystem: Dell 8th Gen Core Processor Host Bridge/DRAM Registers
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)
Kernel driver in use: pcieport
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b
Subsystem: Dell Device 087c
Kernel driver in use: i915
Kernel modules: i915
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 07)
Subsystem: Dell Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem
@oddbjornkvalsund
oddbjornkvalsund / project.json
Last active November 3, 2016 12:52
Minimal .NET Core project-file that depends on fhir-net-api
{
"version": "1.0.0-*",
"dependencies": {
"Hl7.Fhir.DSTU2": "0.90.5",
"Portable.DataAnnotations": "1.0.0"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [ "dnxcore50", "portable-net45" ],
"dependencies": {
@oddbjornkvalsund
oddbjornkvalsund / Example.java
Created September 17, 2015 10:08
Automatic vertical resizing of VirtualFlow
import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Application;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.Button;
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000662050a6, pid=9992, tid=11392
#
# JRE version: Java(TM) SE Runtime Environment (8.0_31-b13) (build 1.8.0_31-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.31-b07 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [javafx_font.dll+0x50a6]
#
Prism pipeline init order: sw
Using platform text rasterizer
Using native-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
import com.sun.glass.ui.PlatformFactory;
import com.sun.glass.ui.monocle.MonoclePlatformFactory;
import com.sun.glass.ui.monocle.NativePlatformFactory;
import com.sun.glass.ui.monocle.headless.HeadlessPlatform;
import javafx.application.Application;
import java.lang.reflect.Field;
public class MonocleRunner {
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class MonocleApplication extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
final Text node = new Text("A Text node.");