Skip to content

Instantly share code, notes, and snippets.

@atamis
atamis / pong.log
Created February 5, 2019 00:16
Log from the Amethyst pong example.
[INFO][winit::platform::platform::x11::window] Guessed window DPI factor: 1.6666666666666667
[DEBUG][winit::platform::platform::x11::window] Calculated physical dimensions: 500x500
[INFO][gfx_device_gl::info] parsing version '4.5 (Core Profile) Mesa 18.2.2'
[INFO][gfx_device_gl::info] parsing version '4.50'
[INFO][gfx_device_gl] Info { platform_name: PlatformName { vendor: "Intel Open Source Technology Center", renderer: "Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) " }, version: 4.5, shading_language: 4.50, extensions: {"GL_ARB_internalformat_query2", "GL_EXT_shader_integer_mix", "GL_ARB_timer_query", "GL_AMD_conservative_depth", "GL_ARB_shader_texture_image_samples", "GL_EXT_draw_instanced", "GL_EXT_texture_integer", "GL_ARB_texture_multisample", "GL_ARB_sync", "GL_ARB_texture_buffer_range", "GL_ARB_robust_buffer_access_behavior", "GL_ANGLE_texture_compression_dxt5", "GL_S3_s3tc", "GL_EXT_texture_shared_exponent", "GL_ARB_vertex_type_10f_11f_11f_rev", "GL_ARB_fragment_shader", "GL_ARB_seamless_cubemap_pe
@atamis
atamis / mix.exs
Created November 8, 2018 23:25
Minor usability issue in nimble-parsec
defmodule NimbleParsecTest.MixProject do
use Mix.Project
def project do
[
app: :nimble_parsec_test,
version: "0.1.0",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps()
double Thermister(int RawADC) {
double Temp;
Temp = log(((10240000/RawADC) - 10000));
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
Temp = Temp - 273.15; // Convert Kelvin to Celcius
Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
return Temp;
}
boolean debug = false;
@atamis
atamis / prototype.rkt
Created May 4, 2012 01:08
A quick and dirty prototype object system in Racket.
#lang racket
(require test-engine/racket-tests)
;; an object is...
; a list of...
; a list in which...
; the 1st item is a symbol, the slot name
; the 2nd item is the value of the slot, which could be anything
@atamis
atamis / gist:2495102
Created April 26, 2012 01:45
History notes
Events.
Feb. 1945: Yalta. First conference between Churchill, Stalin, and FDR. Discussed Poland and Declaration of Liberated Europe. Also dividing Germany.
July 1945: Potsdam. Another meeting between the big 3. Talk about reparations. Structure it so that they can actually pay.
1947: Taft-Hartley Act. Required union leaders to take oaths that they weren't Communists.
1948-1949: Berlin Airlift. Flying supplies to West Berlin when the Soviet Union blockades the roads and rail roads.
1949: Communist forces secure mainland China; Nationalists flee to Formosa, set up government. USSR successfully tests an atomic bomb.
1950: McCarran Act. Made supporting the establishment of a totalitarian government illegal. Required Communist or
1950-1953: Korean War. Proxy war. North Korea beaten back, then China jumps in and almost win, then UN forces beat them back again.
@atamis
atamis / Wwords.rb
Created April 12, 2012 07:40
William Whitaker's Words script
#!/usr/bin/env ruby
require 'nokogiri'
require 'open-uri'
def url(x)
"http://www.archives.nd.edu/cgi-bin/wordz.pl?keyword=" + x
end
def get(url)
@atamis
atamis / install_rails.sh
Created April 12, 2012 04:25
Quick and simple install script for nginx, passenger, and rails
#!/bin/bash
# Gotta get me some colors
echo "Updating package listing"
sudo apt-get update
echo "Installing packages"
sudo apt-get install -y curl git-core build-essential bison \
openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev \
@atamis
atamis / gist:1734331
Created February 4, 2012 01:38
Polaris pilotlog
EV Nova pilot data dump
Output on 2/3/2012 at 5:37 PM
Game version: 1.1.1
Plugins loaded:
none
Pilot name: Goroth Obarskyr
@atamis
atamis / soundMeter.pde
Created January 14, 2012 01:08
Arduino volume monitor
int analogPin = 0; // potentiometer wiper (middle terminal) connected to analog pin 3
// outside leads to ground and +5V
int writePin1 = 2;
int writePin2 = 3;
int writePin3 = 4;
int writePin4 = 5;
int writePin5 = 6;
int writePin6 = 7;
int val = 0; // variable to store the value read
@atamis
atamis / errors.sh
Created September 5, 2011 17:45
Errors faced when attempting to compile https://github.com/FalconNL/mc2obj
$ ghc mc2obj.hs
mc2obj.hs:10:0:
Failed to load interface for `ObjExport':
Use -v to see a list of the files searched for.
$ ghc ObjExport.hs
ObjExport.hs:63:17:
Couldn't match expected type `BC.ByteString'
against inferred type `bytestring-0.9.1.7:Data.ByteString.Internal.ByteString'