Skip to content

Instantly share code, notes, and snippets.

Eddy Luten EddyLuten

Block or report user

Report or block EddyLuten

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am eddyluten on github.
  • I am luten (https://keybase.io/luten) on keybase.
  • I have a public key ASAMlrRIzcCu0fP3u4rNAjZOl4N0At0yHpK53iyfBH3prQo

To claim this, I am signing this object:

View trace.rs
use std::io::prelude::*;
use std::fs::File;
use std::path::Path;
use std::error::Error;
struct Vector3D {
x: f32,
y: f32,
z: f32,
}
@EddyLuten
EddyLuten / resample.c
Created Nov 24, 2016
Resample using source area average (for downsampling)
View resample.c
#define UMAX(x, y) ((uint32_t)(x > y ? x : y))
#define UMIN(x, y) ((uint32_t)(x < y ? x : y))
static inline uint8_t* resample(
uint8_t* src,
uint32_t src_width,
uint32_t src_height,
uint32_t dest_width,
uint32_t dest_height
)
@EddyLuten
EddyLuten / nearest.c
Created Nov 23, 2016
Nearest neighbor 3-component image resizing function
View nearest.c
static uint8_t* resize_nearest(
uint8_t* source_data,
uint32_t source_width,
uint32_t source_height,
uint32_t resized_width,
uint32_t resized_height
)
{
uint32_t x, y, di, si;
double px, py;
View justin.java
public static void main(String args[]) {
{
Scanner input = new Scanner (System.in);
int purchases = 0; // init purchases
char firstLetter;
do
{
// TODO: print some shit on the screen here
@EddyLuten
EddyLuten / build_error.rb
Created Nov 10, 2015
make check error 2.3.0-dev trunk 2015-11-10
View build_error.rb
[ 9905/15626] TestProcess#test_execopts_gid = 0.00 s
2) Error:
TestProcess#test_execopts_gid:
ArgumentError: can't find group for 804375733
/Users/xxx/git/ruby/test/ruby/test_process.rb:1792:in `getgrgid'
/Users/xxx/git/ruby/test/ruby/test_process.rb:1792:in `block in test_execopts_gid'
/Users/xxx/git/ruby/test/ruby/test_process.rb:1792:in `map'
/Users/xxx/git/ruby/test/ruby/test_process.rb:1792:in `test_execopts_gid'
View SNIP.Build.cs
// Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
namespace UnrealBuildTool.Rules
{
public class SNIP : ModuleRules
{
public SNIP(TargetInfo Target)
{
PublicIncludePaths.AddRange(
new string[] {
View gist:e2ba77b6225f5eab1cc7
1>------ Build started: Project: UE4, Configuration: DebugGame_Editor x64 ------
1> Building UnrealHeaderTool...
1> Target is up to date.
1> Parsing headers for UE4Editor
1> Code generation finished for UE4Editor and took 2.629
1> Module.SNIP.cpp
1> link.exe UE4Editor-SNIP.dll
1> Creating library PATH\Engine\Plugins\SNIP\Intermediate/Build/Win64\Dynamic\UE4Editor\DebugGame\UE4Editor-SNIP.lib and object PATH\Engine\Plugins\SNIP\Intermediate/Build/Win64\Dynamic\UE4Editor\DebugGame\UE4Editor-SNIP.exp
1>Module.SNIP.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FAttenuationSettings const * __cdecl USoundBase::GetAttenuationSettingsToApply(void)const " (?GetAttenuationSettingsToApply@USoundBase@@UEBAPEBUFAttenuationSettings@@XZ)
1>Module.SNIP.cpp.obj : error LNK2001: unresolved external symbol "public: virtual float __cdecl USoundBase::GetVolumeMultiplier(void)" (?GetVolumeMultiplier@USoundBase@@UEAAMXZ)
@EddyLuten
EddyLuten / chapter.4.issue.9.c
Created May 24, 2014
Chapter 4, Issue 9 - OpenGLBook.com
View chapter.4.issue.9.c
// https://github.com/openglbook/openglbook.com/issues/9
const Vertex VERTICES[8] =
{
{ { -.5f, -.5f, .5f, 1 }, { 0, 0, 1, 1 } }, // 0 L down front
{ { -.5f, .5f, .5f, 1 }, { 1, 0, 0, 1 } }, // 1 L up front
{ { .5f, .5f, .5f, 1 }, { 0, 1, 0, 1 } }, // 2 R up front
{ { .5f, -.5f, .5f, 1 }, { 1, 1, 0, 1 } }, // 3 R down front
{ { -.5f, -.5f, -.5f, 1 }, { 1, 1, 1, 1 } }, // 4 L down back
{ { -.5f, .5f, -.5f, 1 }, { 1, 0, 0, 1 } }, // 5 L up back
@EddyLuten
EddyLuten / chapter.4.38.c
Created May 21, 2014
Chapter 4, Snippet 38 - OpenGLBook.com
View chapter.4.38.c
glGenBuffers(2, &BufferIds[1]);
ExitOnGLError("ERROR: Could not generate the buffer objects");
You can’t perform that action at this time.