Skip to content

Instantly share code, notes, and snippets.


Vladimir Mitrović vl4dimir

View GitHub Profile

Keybase proof

I hereby claim:

  • I am vl4dimir on github.
  • I am vl4dimir ( on keybase.
  • I have a public key ASBsjYZmp4FqTWSPzp6GFLmYirkvTJFikkuEGnqJTzVl3wo

To claim this, I am signing this object:

View ufo2to3.diff
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" "">
<plist version="1.0">
- <key>ascender</key>
vl4dimir / Cheap3dNoise.hlsl
Last active Sep 14, 2018
A computationally cheap version of smooth 3D noise, in HLSL.
View Cheap3dNoise.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);
View kovan-address.txt
vl4dimir / VectorFieldInterpolation.cs
Last active Nov 6, 2016
The math for interpolating a vector on an arbitrary location inside a vector field.
View VectorFieldInterpolation.cs
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;
View SaneRSA.h
#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 / Stopwatch.h
Created Jan 4, 2011
Stopwatch class used for cumulative runtime timing.
View Stopwatch.h
#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 / Singleton.h
Created Dec 17, 2010
An Objective-C singleton class.
View Singleton.h
// Singleton.h
#import <Foundation/Foundation.h>
@interface Singleton : NSObject {
vl4dimir / AsyncTest.h
Created Nov 20, 2010
Example asynchronous GHUnit test.
View AsyncTest.h
#import <SenTestingKit/SenTestingKit.h>
@interface AsyncTests : SenTestCase {
NSCondition* condition;
BOOL operationSucceeded;
View Photo.m
#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;