Skip to content

Instantly share code, notes, and snippets.

View StagPoint's full-sized avatar

StagPoint Software StagPoint

  • StagPoint Software
  • Seattle, WA
View GitHub Profile
@conspect
conspect / cult_of_ignorance.md
Last active May 29, 2024 19:02
A Cult Of Ignorance, Isaac Asimov

It's hard to quarrel with that ancient justification of the free press: "America's right to know." It seems almost cruel to ask, ingeniously, "America's right to know what, please? Science? Mathematics? Economics? Foreign languages?"

None of those things, of course. In fact, one might well suppose that the popular feeling is that Americans are a lot better off without any of that tripe.

There is a cult of ignorance in the United States, and there always has been. The strain of anti-intellectualism has been a constant thread winding its way throughout political and cultural life, nurtured by the false notion that democracy means that "my ignorance is just as good as your knowledge."

Politicians have routinely striven to speak the language of Shakespeare and Milton as ungrammaticaly as possible in order to avoid offending their audiences by appearing to have gone to school. Thus, Adlai Stevenson, who incautiously allowed intelligence and learning and wit to peep out of his speeches, found the American people

@CmdQ
CmdQ / radixsort.hpp
Last active September 5, 2023 06:22
Radix sort for (un-)signed integer types, float & double.
/* Copyright (c) 2015 Tobias Becker
**
**
**
** 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 the rights
** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
** copies of the Software, and to permit persons to whom the Software is
** furnished to do so, subject to the following conditions:
inline bool intersect_ray_aabb(const glm::vec3 &origin, const glm::vec3 &dir, const AABB &aabb) {
float tmin, tmax, tymin, tymax, tzmin, tzmax;
glm::vec3 bounds[2];
bounds[0] = aabb.min();
bounds[1] = aabb.max();
glm::vec3 invdir = 1.f / dir;
glm::i8vec3 sign;
@rhm
rhm / HOWTO-remove-GWX.md
Last active May 23, 2016 03:17
Instructions on how to remove GWX and prevent Windows 7 from trying to upgrade to Windows 10.

When Microsoft announced that they would give Windows 10 as a free upgrade to all Windows users, it seemed like good news. Then they decided to force it on everyone by using Windows Update to push KB3035583 to everyone as an 'important' update. This installs a package called GWX (get Windows 10) that does some obvious things:-

* Displays a white Windows logo and many flags in the notification area.
* Brings up a dialog offering you Windows 10 every time you boot your PC.
* Background downloads the actual Windows 10 installation files to your C drive.
* Prompts you to run the install, reportedly with a dialog box that can't be closed.

GWX also engages in some borderline malware behaviour:-

  • GWX is installed under an account that prevents even users with Administrator privs deleting it.
@neon-izm
neon-izm / equiSkyBoxUnity.shader
Created March 4, 2016 11:52
use Equirectangular picture for unity skybox
Shader "Skybox/Equirectangular" {
Properties{
_Tint("Tint Color", Color) = (.5, .5, .5, .5)
[Gamma] _Exposure("Exposure", Range(0, 8)) = 1.0
_Rotation("Rotation", Range(0, 360)) = 0
[NoScaleOffset] _Tex("Panorama (HDR)", 2D) = "grey" {}
}
SubShader{
Tags{ "Queue" = "Background" "RenderType" = "Background" "PreviewType" = "Skybox" }
@pervognsen
pervognsen / x64_emitter.cpp
Created May 14, 2016 20:31
x64 machine code emitter
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <windows.h>
#include <stdint.h>
#define Assert(x) \
if (!(x)) { MessageBoxA(0, #x, "Assertion Failure", MB_OK); __debugbreak(); }
enum Register {
RAX = 0,
hader "Unlit/GridOverlay"
{
Properties
{
_GridSize("Grid Size", Float) = 10
_Grid2Size("Grid 2 Size", Float) = 160
_Grid3Size("Grid 3 Size", Float) = 320
_Alpha ("Alpha", Range(0,1)) = 1
}
SubShader
@mattvr
mattvr / CurvedPlane.cs
Created June 29, 2016 04:29
Curved plane for Unity
/*
MIT License
Copyright (c) 2016 Matt Favero
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 the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@Feddas
Feddas / EliteDangerousKeyBindings.md
Last active January 29, 2024 16:22
Elite:Dangerous Key Bindings

How to make key bindings

As described in this reddit post, you can add multiple custom binds by copying and renaming the file at:

C:\Users\[your username]\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\Customs.binds

Clutches are holding one button then pressing another, like Ctrl+S. They're great for adding more bindings to the same number of buttons. Here's more details: http://www.reddit.com/r/EliteDangerous/comments/2y7tjv/option_to_bind_button_to_multiple_functions/

My Keybinds

Everything below is the custom setup I use. It's based off of the "Control pad with yaw" control scheme. I tried to make clutches that complimented the non-clutched version of the button. Here are the differences from the "Control pad with yaw" control scheme.

@nothke
nothke / Draw.cs
Last active January 20, 2024 06:58
///
/// Draw lines at runtime
/// by Nothke
/// unlicensed, aka do whatever you want with it
/// made during Stugan 2016 :)
/// ..(it's midnight, and Robbie clicks A LOT, LOUDLY!)
///
/// Important:
/// - Should be called in OnPostRender() (after everything else has been drawn)
/// therefore the script that calls it must be attached to the camera