Skip to content

Instantly share code, notes, and snippets.

View duzenko's full-sized avatar
💭
"Do you remember bluer screens, happy days and simpler times?" (C)

duzenko

💭
"Do you remember bluer screens, happy days and simpler times?" (C)
View GitHub Profile
@duzenko
duzenko / gnome-shell.css
Last active April 9, 2024 08:15
Gnome 42 light theme (ubuntu 22)
/* based on https://gitlab.gnome.org/eeshugerman/gnome-shell-theme-default-light with dock tweaks */
/* save as ~/.themes/Default-light/gnome-shell/gnome-shell.css and enable with gnome-tweaks */
/* This stylesheet is generated, DO NOT EDIT */
/* Copyright 2009, 2015 Red Hat, Inc.
*
* Portions adapted from Mx's data/style/default.css
* Copyright 2009 Intel Corporation
*
* This program is free software; you can redistribute it and/or modify it
@duzenko
duzenko / gist:9e71c5595b05a07f0d0294d49c03e8fb
Created May 29, 2020 15:37
Web Mercator projection (e.g. ImageMapTypeOptions.getTitleUrl)
const project = ( latLng: google.maps.LatLng, zoom: number ) => {
const scale = Math.pow( 2, zoom );
const lambda = latLng.lng() / 180 * Math.PI;
const phi = latLng.lat() / 180 * Math.PI;
return new google.maps.Point(
256 / 2 / Math.PI * scale * ( lambda + Math.PI ),
256 / 2 / Math.PI * scale * ( Math.PI - Math.log( Math.tan( Math.PI / 4 + phi / 2 ) ) )
);
}
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <vector>
#include <iostream>
#include <Windows.h>
void framebuffer_size_callback( GLFWwindow* window, int width, int height );
void processInput( GLFWwindow* window );
void R_GenerateHeightmap( idStr materialName ) {
for ( int i = 0; i < backEnd.viewDef->numDrawSurfs; i++ ) {
const drawSurf_t* drawSurf = backEnd.viewDef->drawSurfs[i];
if ( materialName != drawSurf->material->GetName() )
continue;
const int N = 1024;
int pixels[N * N];
auto fileName = idStr::Fmt( "heightmap%d.tga", i );
R_WriteTGA( fileName, (byte*)pixels, N, N, true );
}
seta gui_mediumFontLimit "0.3"
seta gui_smallFontLimit "0.15"
seta net_socksPassword ""
seta net_socksUsername ""
seta net_socksPort "1080"
seta net_socksServer ""
seta net_socksEnabled "0"
seta win_maximized "1"
seta win_ypos "-9"
seta win_xpos "71"
#version 400
// vertex shader output
in vec4 var_Position;
in vec4 var_PositionWorld;
in vec2 var_TexDiffuse;
in vec2 var_TexNormal;
in vec2 var_TexSpecular;
in mat3 var_TangentBitangentNormalMatrix;
in vec4 var_Color;
at Plugin.Media.MediaPickerDelegate+<GetPictureMediaFile>d__25.MoveNext () <0x102230de0 + 0x00318> in <d68707a0b2ce415cab10ded45b8d9a7a#d4755150de43238166081fcbf8fa2cf5>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10109a5e0 + 0x00028> in <0f7865fc4fbb4fddaab6f86c915ebae0#d4755150de43238166081fcbf8fa2cf5>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10109d920 + 0x000d3> in <0f7865fc4fbb4fddaab6f86c915ebae0#d4755150de43238166081fcbf8fa2cf5>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10109d870 + 0x0008b> in <0f7865fc4fbb4fddaab6f86c915ebae0#d4755150de43238166081fcbf8fa2cf5>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10109d800 + 0x00053> in <0f7865fc4fbb4fddaab6f86c915ebae0#d4755150de43238166081fcbf8f
@duzenko
duzenko / gist:ef6fbb3ebab9e6f9705215ce3c7de65b
Created March 19, 2018 09:38
PermissionsPlugin - TaskCanceledException
04-02 04:37:34.631 I/MonoDroid(27558): UNHANDLED EXCEPTION:
04-02 04:37:34.671 I/MonoDroid(27558): System.Threading.Tasks.TaskCanceledException: A task was canceled.
04-02 04:37:34.672 I/MonoDroid(27558): at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00026] in <fcbf47a04b2e4d90beafbae627e1fca4>:0
04-02 04:37:34.672 I/MonoDroid(27558): at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <fcbf47a04b2e4d90beafbae627e1fca4>:0
04-02 04:37:34.672 I/MonoDroid(27558): at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <fcbf47a04b2e4d90beafbae627e1fca4>:0
04-02 04:37:34.672 I/MonoDroid(27558): at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <fcbf47a04b2e4d90beafbae627e1fca4>:0
04-02 04:37:34.672 I/MonoDroid(27558): at Plugin.Permissions.Permi