Skip to content

Instantly share code, notes, and snippets.

Vladimir Mitrović vl4dimir

Block or report user

Report or block vl4dimir

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 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" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
-<dict>
@vl4dimir
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
0x0038c246FB276265394060676ee0D3BA8ee7dC08
@vl4dimir
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
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
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
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;
}
@end
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;
View Photo.h
#import <CoreData/CoreData.h>
@interface Photo : NSManagedObject {
}
@property (nonatomic, retain) NSString * imagePath;
@property (nonatomic, retain) NSString * thumbnailPath;
@property (nonatomic, retain) UIImage* image;
@property (nonatomic, retain, readonly) UIImage* thumbnail;
You can’t perform that action at this time.