Skip to content

Instantly share code, notes, and snippets.

Section "Monitor"
Identifier "Monitor0"
Modeline "3840x2160" 307.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync
EndSection
Section "Screen"
Identifier "Screen0"
Device "HDMI-0"
Option "ModeValidation" "AllowNon60hzmodesDFPModes, NoEDIDDFPMaxSizeCheck, NoVertRefreshCheck, NoHorizSyncCheck, NoDFPNativeResolutionCheck, NoMaxSizeCheck
, NoMaxPClkCheck, AllowNonEdidModes, NoEdidMaxPClkCheck"
Monitor "Monitor0"
@digitalsanity
digitalsanity / Linux_DRM_OpenGLES.c
Created July 14, 2018 05:32 — forked from Miouyouyou/Linux_DRM_OpenGLES.c
An example, inspired by Rob Clark "kmscube.c" that uses Linux Direct Rendering Manager ( DRM ) and EGL to create an OpenGL ES 2 context. This is a standalone example, that just clears the screen with a blueish color. Usable with Rockchip DRM drivers and Mali Wayland/DRM userspace drivers.
// gcc -o drmgl Linux_DRM_OpenGLES.c `pkg-config --cflags --libs libdrm` -lgbm -lEGL -lGLESv2
/*
* Copyright (c) 2012 Arvin Schnell <[email protected]>
* Copyright (c) 2012 Rob Clark <[email protected]>
* Copyright (c) 2017 Miouyouyou <Myy> <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
@digitalsanity
digitalsanity / gist:375d95ec5ad0673e10c50beb0e2c4e13
Created July 13, 2018 23:06
rock64 4GB RAM, packages installed on ayufan bionic 0.6.44
Listing...
abiword/bionic,now 3.0.2-6 arm64 [installed]
abiword-common/bionic,bionic,now 3.0.2-6 all [installed,automatic]
acl/bionic,now 2.2.52-3build1 arm64 [installed,automatic]
adapta-gtk-theme/now 3.93.1.22-0ubuntu1~bionic1 all [installed,upgradable to: 3.94.0.1-0ubuntu1~bionic1]
adduser/bionic,bionic,now 3.116ubuntu1 all [installed]
adwaita-icon-theme/bionic,bionic,now 3.28.0-1ubuntu1 all [installed,automatic]
aisleriot/bionic,now 1:3.22.5-1 arm64 [installed]
alsa-utils/bionic,now 1.1.3-1ubuntu1 arm64 [installed]
alsoft-conf/bionic,now 1.4.3-2 arm64 [installed]
FF Quantum arm/linux tweaks for performance/lightweight
- Also consider using Custom Theme and hiding the toolbar/title/statusbar to gain some additional screen space. My title bar is now the row of pinned tabs.
- Set in about:config
accessibility.force_disabled;1
accessibility.typeaheadfind.flashBar;0
browser.backspace_action;1
browser.cache.disk.capacity;358400
@digitalsanity
digitalsanity / gist:d5dfb4b2d6afa885a5d4edf82ce60d40
Created September 29, 2016 06:08 — forked from jstanden/gist:1489447
Simplex Noise in C# for Unity3D - Adapted from James Livingston's MinePackage: http://forum.unity3d.com/threads/minepackage-minecraft-starter-package.69573/
using UnityEngine;
using System.Collections;
public class SimplexNoiseGenerator {
private int[] A = new int[3];
private float s, u, v, w;
private int i, j, k;
private float onethird = 0.333333333f;
private float onesixth = 0.166666667f;
private int[] T;
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. The main difference is that once the
* bit flags are determined, the result is pulled from a lookup table, saving the time
* used deciphering the bit flags again. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;