Skip to content

Instantly share code, notes, and snippets.

View vl4dimir's full-sized avatar

Vladimir Mitrović vl4dimir

View GitHub Profile

Keybase proof

I hereby claim:

  • I am vl4dimir on github.
  • I am vl4dimir (https://keybase.io/vl4dimir) on keybase.
  • I have a public key ASBsjYZmp4FqTWSPzp6GFLmYirkvTJFikkuEGnqJTzVl3wo

To claim this, I am signing this object:

This file has been truncated, but you can view the full file.
diff --git a/source/Hack-Bold.ufo/fontinfo.plist b/source/Hack-Bold.ufo/fontinfo.plist
index 56804ca65..fc5120605 100644
--- a/source/Hack-Bold.ufo/fontinfo.plist
+++ b/source/Hack-Bold.ufo/fontinfo.plist
@@ -1,45 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
-<dict>
- <key>ascender</key>
@vl4dimir
vl4dimir / Cheap3dNoise.hlsl
Last active September 14, 2018 07:39
A computationally cheap version of smooth 3D noise, in HLSL.
float random(float3 seed) {
float result = frac(sin(dot(seed, float3(12.9898, 78.233, 49.0154))) * 43758.5453123);
return result;
}
// Returns a smoothly varying value in the [0, 1] range for the given 3D position.
float simpleNoise(float3 position) {
float3 integers = floor(position);
float random000 = random(integers);
0x0038c246FB276265394060676ee0D3BA8ee7dC08
@vl4dimir
vl4dimir / VectorFieldInterpolation.cs
Last active November 6, 2016 21:51
The math for interpolating a vector on an arbitrary location inside a vector field.
public Vector3 VectorAt(float x, float y, float z) {
if (x < 0f) x = Mathf.Abs(x);
if (y < 0f) y = Mathf.Abs(y);
if (z < 0f) z = Mathf.Abs(z);
int floorX = Mathf.FloorToInt(x);
float tx = x - floorX;
floorX %= Dimension;
int ceilX = Mathf.CeilToInt(x) % Dimension;
#import <Foundation/Foundation.h>
/**
SaneRSA abstracts away the gory details of the RSA algorithm and exposes a clean, minimal interface
to the outside world. The only data that needs to be fed into a SaneRSA instance is the desired RSA
key size and the remote end's RSA public key (which obviously needs to have the same key size).
*/
@interface SaneRSA : NSObject
@property (nonatomic, readonly) NSData* publicKey;
@vl4dimir
vl4dimir / Stopwatch.h
Created January 4, 2011 15:29
Stopwatch class used for cumulative runtime timing.
#import <Foundation/Foundation.h>
@interface Stopwatch : NSObject {
// Name to be used for logging
NSString* name;
// Total run time
NSTimeInterval runTime;
// The start date of the currently active run
@vl4dimir
vl4dimir / Singleton.h
Created December 17, 2010 13:23
An Objective-C singleton class.
//
// Singleton.h
//
#import <Foundation/Foundation.h>
@interface Singleton : NSObject {
}
@vl4dimir
vl4dimir / AsyncTest.h
Created November 20, 2010 14:44
Example asynchronous GHUnit test.
#import <SenTestingKit/SenTestingKit.h>
@interface AsyncTests : SenTestCase {
NSCondition* condition;
BOOL operationSucceeded;
}
@end
#import "UIImage+Resizing.h"
@implementation Photo
@dynamic imagePath;
@dynamic thumbnailPath;
static const CGFloat kThumbnailWidth = 75.0f;
static const CGFloat kThumbnailHeight = 75.0f;
static const CGFloat kJPEGQuality = 0.85f;